Clean things up in case of Netatmo Webhook configuration

Hi Netatmo fans

I was struggling a bit to integrate my new Netatmo presence.
Allways receive this error like many others too:

[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'

My Home Assistance is fully reachable from the internet via 443 and valid certificate.
The configuration.yaml is containing the netatmo: section with clien_id and client_secret.
But every time i load the integration via configuration.yaml the webhook fails to load.

Now i tried to activate the nabu casa trial and reload the netatmo integration and bling bling…
The webhook is sucsessfull activated…

tl;dr

Is there any possibility to run the netatmo integration with webhooks without nabu casa?

Any help is very appreciated.

Yes, this is totally possible. Double check your external url in the general configuration. This should be set to https://your.external.url.

Thanks for reply.
The external url is in place and correct.
But is it a problem when the external url and internal url is the same?
In my setup, i use the same url for internal and external access. The client receives the right IP from internal/external dns.

What are the technical prerequisites that the webhook is working?

Being available on 443 should be enough. The error message suggests that the provided URL is using a different port.

I have HA behind a nxing reverse proxy, exposed via 443 and that is working fine.

Do you have set use_x_forwarded_for in your configuration in case you’re behind a reverse proxy?

http:
  use_x_forwarded_for: true

No proxy.
HA is located in DMZ and is published directly with portforwarding.

Are you using the plugin for the certificate handling or did you do that yourself?

Im am on HASSOS and use the Let’s Encrypt AddOn with Google DNS.

Unfortunately I have never used that. But I’d suggest to try with a different internal URL just for trying.

Is there a possibility to register the webhook to my own URL even if the nabu casa service is connected?

Why would you wanna do that?

Great Thanks for putting me in the right direction.
I have setup a different internal URL.
Now the Webhook is registered successfully.

I will test all other components after this URL change. Imo there should be no issues about this.

Thanks for your fast replys. I realy appreciate this.

Propably its an issue to fix when internal and external URL will be the same (also in other components).

Have a great day!

1 Like