Webhook correctly present on NABU CASA and Activated (I get the url and tested the url with curl -XPOST … it works correctly and I receive the webhook and the automation works perfectly.
Unfortunately I do not receive any webhook from Netatmo. Nothing on logs!!
Where I am wrong. How can I test the whebhook is registered?
I am using a dev account. I login on https://dev.netatmo.com. I can read the relevant documentation, create apps etc…
Is there any difference I don’t know?
Yes, this is definitely a problem as for webhook Netatmo only supports a hand full of ports. I strongly suggest to use https over (the standard) port 443.
Exposing your instance unencrypted is something I would strongly advise against.
I know but I was just testing the installation before introducing another potential problem.
I am using nabu casa. Can I expose as external_url the nabu casa remote ui?
In my knowledge using nabu casa, netatmo webhook should be managed by the cloud. Netatmo should post the webhook to nabu casa that transparently redirect the hook to my instance. This should be the way. I am really get confused…
Ah, now the title makes more sense. Sorry that I didn’t spot that earlier. Using Nabu Casa should solve all your problems. Simply set your external url to your Nabu Casa remote url. Nothing else should be configured to make it working as far as I can remember.
Thank you for the valuable information not written in the nabu casa documentation.
Unfortunately does not work. I just invoke the service netatmo.register_webhook but this is the log results:
2022-01-19 11:47:33 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://hooks.nabu.casa/xxxxxxxxxxxxxxxxxxxxkCaEl-ZaQGGb8SpNqHyf8oJ-7sz9KpPA6JLNezF6c0MuIsYvF0uCy9KckLD7fxsjDrwgCMsEB9Xk3MXZs6zfqU4FmkH0S0G5q7NN4qHy9YSYd-AqZsuCTk_Rhh2DCvk0TnzhxxZZrpSfRL3y1x3xhJ_gcUhg4E06p5s=
2022-01-19 11:48:02 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2022-01-19 11:48:02 DEBUG (MainThread) [homeassistant.components.netatmo] Unregister Netatmo webhook (e24cc6c178d293ec45aecea47656dd75b11ad4c90de00a51c07fc369332f1b73)
2022-01-19 11:48:02 INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook unregistered
Netatmo dev page shows Webhook status OK.
I don’t know if this mean the webhook is not banned or it is still possible is banned. Is there any way to check?
I asked also to nabu casa support without any answer.
Thank you in advance for any info you can give to solve this stupid problem…
Use Nabu Casa and set the nabu casa personal URL configured as external_url
Use Nabu casa and set my DDNS as external_url
Any combination of what is written in the documentation. Without any success!!!
I understand that the only way is to set a client platform and test the Netatmo API. It is a lot of time spending but at the end I will understand and finally let you know. May be we can improve the “documentation”. Thank you for your effort.