Hello together,
I am currently trying to get the new netatmo doorbell webhook to work. I configured my HA with reverse Proxy and NGINX. In my FritzBox config I forwarded port 80 and 443 to my HA-IP. In the HA-config I added the required:
use_x_forwarded_for: true
trusted_proxies:
172.30.33.0/24
I also added the External url: https://xxx.yyy.myfritz.net
and internal http://homeassistant:8123
.
With all that configured it is possible to connect to my HA-Instance when I am on the Road.
I then created a webhook sensor to listen on /api/webhook/doorbell-post-event
With Postman I confirmed the API-Endpoint and the sensor. Allthough only through the local Network. (I used the https://xxx.yyy.myfritz.net/api/webhook/...
url. Not sure if this means it goes through the WAN?!)
To be sure i connected to the Endpoint with my phone though the webbrowser, which results in a Status Code 405: Method not allowed
, which is expected behaviour and lets me think HA is properly configured.
To receive doorbell webhooks, I customized the core/homeassistant/components/netatmo/const.py (I created a copy of the Integration in the custom_components folder)
I checked the Netatmo API with https://webhook.site
to make sure it works. On the dev.netatmo.com
i configured my App and set the webhook url to the said https://webhook.site
. After configuration of the Netatmo Integration in HA, which redirects me to the Netatmo authorization site and shows that i am asking for Doorbell permission, I receive a json-body on https://webhook.site
that the webhook is activated.
Now to the problem…
If I add the https://xxx.yyy.myfritz.net/api/webhook/doorbell-post-event
in the webhook config on the Netatmo-dev, I wont receive any Webhook events. I enabled the debug logger for webhooks, so it should show me some.
There are errorlogs for my Netatmo Integration, but I dont think it matters, since it worked with webhook.site and there were the same errors?!
I was wondering if anybody got the same problem and found a working solution.
Could the problem be, that the DS-Lite Tunnel of my Router cause the Problem? Or is it the domainname, which ist too long?! Or does the NGINX- Add-On somehow blocks the request?! Or am I missing something in the proxy config?!
I am searching for some tips where else the error can be and how to find it.
Thanks