Error during webhook registration - 400 - Bad request

Are you using that Netatmo (dev) app elsewhere than HA?

No (I use the native Netatmo android app ?)
I already try to recreate the app on https://dev.netatmo.com/apps/ to be sure there is no conflict

When I delete the integration, 2 “panels” are created with the “configure” button.

( I got 2 ext. cameras working fine)

Have you been using the Netatmo beta integration via HACS?

No, never, only the official integration

If you haven’t done this already please remove the integration, restart HA and then add it back.

1 Like

I already do that, 3 Times :frowning:

Can you please check your config for other entries of netatmo like for example in the climate or sensors config?

All netatmo related config is :

netatmo:
  client_id: !secret netatmo_clientid
  client_secret: !secret netatmo_secretkey

Ok, I just wonder because your log says otherwise:

[homeassistant.components.climate] The netatmo platform for the climate integration does not support platform setup. Please remove it from your config.

Which hints that you have a netatmo entry in your climate config.

Holly crap ! you’re right ! I miss that in my climate.yaml file…
- platform: netatmo

I remove that line, remove/add the integration, same issue :

Sep 24 09:39:33 localhost hass[31933]: #033[32m2020-09-24 09:39:33 INFO (MainThread) [homeassistant.setup] Setting up netatmo#033[0m
Sep 24 09:39:33 localhost hass[31933]: #033[32m2020-09-24 09:39:33 INFO (MainThread) [homeassistant.setup] Setup of domain netatmo took 0.0 seconds#033[0m
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,211 [31933] INFO     homeassistant.components.netatmo.config_flow: Successfully authenticated
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,435 [31933] ERROR    homeassistant.components.netatmo: Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 443 and 80. (21) when accessing 'https://api.netatmo.com/api/addwebhook'
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,515 [31933] DEBUG    homeassistant.components.netatmo.data_handler: Data class HomeData added
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,553 [31933] DEBUG    homeassistant.components.netatmo.data_handler: Data class WeatherStationData added
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,554 [31933] DEBUG    homeassistant.components.netatmo.sensor: Adding module Indoor 70:ee:50:3d:0e:7a
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,557 [31933] DEBUG    homeassistant.components.netatmo.sensor: Adding module Outdoor 02:00:00:3c:dd:80
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,581 [31933] INFO     homeassistant.helpers.entity_registry: Registered new sensor.netatmo entity: sensor.netatmo_darkstation_temperature
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,589 [31933] DEBUG    homeassistant.components.netatmo.netatmo_entity_base: New client sensor.netatmo_darkstation_temperature

...

Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,886 [31933] DEBUG    homeassistant.components.netatmo.data_handler: No weather station available
Sep 24 09:42:20 localhost hass[31933]: 2020-09-24 09:42:20,887 [31933] DEBUG    homeassistant.components.netatmo.data_handler: Data class HomeCoachData added
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,166 [31933] DEBUG    homeassistant.components.netatmo.data_handler: Data class CameraData added
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,167 [31933] DEBUG    homeassistant.components.netatmo.camera: Adding camera 70:ee:50:63:a2:cc cam_devant
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,168 [31933] DEBUG    homeassistant.components.netatmo.camera: Adding camera 70:ee:50:63:ac:b8 cam_jardin
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,247 [31933] INFO     homeassistant.helpers.entity_registry: Registered new camera.netatmo entity: camera.netatmo_cam_devant
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,249 [31933] DEBUG    homeassistant.components.netatmo.netatmo_entity_base: New client camera.netatmo_cam_devant
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,254 [31933] INFO     homeassistant.helpers.entity_registry: Registered new camera.netatmo entity: camera.netatmo_cam_jardin
Sep 24 09:42:21 localhost hass[31933]: 2020-09-24 09:42:21,267 [31933] DEBUG    homeassistant.components.netatmo.netatmo_entity_base: New client camera.netatmo_cam_jardin
Sep 24 09:48:20 localhost hass[31933]: 2020-09-24 09:48:20,607 [31933] DEBUG    homeassistant.components.netatmo.data_handler: No weather station available
Sep 24 09:55:20 localhost hass[31933]: 2020-09-24 09:55:20,349 [31933] DEBUG    homeassistant.components.netatmo.data_handler: No weather station available
Sep 24 09:59:20 localhost hass[31933]: 2020-09-24 09:59:20,290 [31933] DEBUG    homeassistant.components.netatmo.data_handler: 403 - Forbidden - Application does not have the good scope rights (13) when accessing 'https://api.netatmo.com/api/getstationsdata'
Sep 24 10:00:20 localhost hass[31933]: 2020-09-24 10:00:20,404 [31933] DEBUG    homeassistant.components.netatmo.data_handler: 403 - Forbidden - Application does not have the good scope rights (13) when accessing 'https://api.netatmo.com/api/gethomecoachsdata'

Thanks a lot for your help :+1:

@cgtobi : any idea why 6 minutes after start, the integration stop working ?

homeassistant.components.netatmo.data_handler: 403 - Forbidden - Application does not have the good scope rights (13) when accessing 'https://api.netatmo.com/api/getstationsdata'

No, not yet. Could you please create a new app in the Netatmo dev portal and try with that?

Different behavior.

...
Sep 25 15:19:59 localhost hass[31842]: 2020-09-25 15:19:59,419 [31842] INFO     homeassistant.helpers.entity_registry: Registered new sensor.netatmo entity: sensor.netatmo_darkstation_outdoor_battery_level
Sep 25 15:19:59 localhost hass[31842]: 2020-09-25 15:19:59,424 [31842] DEBUG    homeassistant.components.netatmo.netatmo_entity_base: New client sensor.netatmo_darkstation_outdoor_battery_level
Sep 25 15:19:59 localhost hass[31842]: 2020-09-25 15:19:59,641 [31842] DEBUG    homeassistant.components.netatmo.data_handler: No weather station available
Sep 25 15:19:59 localhost hass[31842]: 2020-09-25 15:19:59,647 [31842] DEBUG    homeassistant.components.netatmo.data_handler: Data class HomeCoachData added
Sep 25 15:19:59 localhost hass[31842]: 2020-09-25 15:19:59,932 [31842] DEBUG    homeassistant.components.netatmo.data_handler: Data class CameraData added
...
Sep 25 15:25:59 localhost hass[31842]: 2020-09-25 15:25:59,235 [31842] DEBUG    homeassistant.components.netatmo.data_handler: No weather station available
Sep 25 15:32:59 localhost hass[31842]: 2020-09-25 15:32:59,047 [31842] DEBUG    homeassistant.components.netatmo.data_handler: No weather station available

Please let’s take a step back and tell me a bit about your setup. What is HA running on? Which release? Do you use HACS?

home assistant core on a raspberry pi3
I use hacs but not for Netatmo integration
Now running 0.115.2 but the problem starts probably with 0.113.3

Sensors are updated !

So, is the problem solved now?

Yes ! Thanks !

1 Like

@cgtobi
Hi Tobi, to make sure I understand, I need to change the default HA port from 8123 to 80 or 443 and do a port forward in my router to selected port get it to work properly?

I would rather suggest to open port 80 on your router and forward that to 8124 or even better setup a reverse proxy that does ssl encryption for you and expose that in front of HA.