Page 1 of 1

app webhook unreliable since a few days

Posted: 11 Sep 2020, 19:49
by kiboost
Hi,

I have an app on https://dev.netatmo.com/ for a few years now.

Since three days, without changing anything, I have only maybe one over ten events that get to the webhook url. First thing I checked was to see if my app was not ban, but no ban since a long time. Has always worked reliably.

What happend ? A new problem with Netatmo servers ?

Re: app webhook unreliable since a few days

Posted: 11 Sep 2020, 20:40
by 1l2p
Hello,

No problem here with two Presence, one Welcome and few tags. More than 200 callbacks received today (from "NetatmoWebhookServer/1.0" @ infra.azure.netatmo.net) and I find them much more responsive than they were few months ago.

Re: app webhook unreliable since a few days

Posted: 12 Sep 2020, 10:48
by kiboost
Hum strange. Does something changed in json structure sent ?

I also saw on dev website that there is not anymore the list of webhooks sent.

Re: app webhook unreliable since a few days

Posted: 12 Sep 2020, 14:38
by 1l2p
I checked the JSON and couldn't find any changes. However I have a doubt between "push_type" and "event_type", but I am only using "event_type" for years.

https://dev.netatmo.com/apidocumentatio ... ity#events

The documentation is not very clear on this point.

Re: app webhook unreliable since a few days

Posted: 13 Sep 2020, 10:42
by kiboost
I have set a debug, logging everything

Code: Select all

$jsonData = file_get_contents('php://input');
file_put_contents('debug.txt', $jsonData, FILE_APPEND);
And indeed, I really don't receive them. Sometimes for a few minutes I got some, then nothing for hours. And it happend suddenly without changing anything :?

I also still have lot of "push_type":"webhook_activation" . Reported it years ago but never changed ...

Maybe I should create a new app to try. But still can't delete apps on dev account (same, for years..)

Re: app webhook unreliable since a few days

Posted: 14 Sep 2020, 12:22
by kiboost
same thing with another old disabled app, have switch to it with same webhook url.
Had four events one hour ago, and nothing anymore now

:evil:

Re: app webhook unreliable since a few days

Posted: 14 Sep 2020, 16:33
by 1l2p
Very strange... I just get "NOC-animal", "NOC-human", "NACamera-tag_small_move", "NACamera-movement"... but no "webhook_activation" at all in "push_type" entries.
Did you check the scope values of your apps?

Re: app webhook unreliable since a few days

Posted: 14 Sep 2020, 16:55
by kiboost
There is nothing regarding scope values on https://dev.netatmo.com/apps/xxxx ?

And why receiving a few sometimes ? It should work always or never :?

Re: app webhook unreliable since a few days

Posted: 19 Dec 2020, 11:21
by kiboost
Just in case someone else have such problems, I finally found a solution.

I have some script and Jeedom plugins that get some data on my webhook. These access throw API are what generates these pushtype webhook_activation.

And such access make camera webhooks totally unreliable.

So finnally, I created two apps in my dev account:
- one with webhook uri, which goes to my php endpoint
- one without webhook uri, and I use this one client/secret for all my scripts and plugins api access

-> No more webhook_activation event on my endpoint, and got all timeline camera events !!

I still think this is not normal and should be fixed on netatmo side, this happened suddenly (netatmo server update ?), but well, it is now back reliable !!

Re: app webhook unreliable since a few days

Posted: 22 Dec 2020, 12:37
by wivaku
@kiboost: can you clarify your workaround?

I have registered 2 apps:
A: without webhook URI, used by Home Assistant (using client ID + secret) [this has been the app I registered originally]
B: with webhook URI, to be used for notifications

I get no webhook notifications. I also tried adding the webhook to the original app. Same result.
Using the same webhook URI, I do get them when manually e.g.

curl -X POST \
--data '{"push_type": "outdoor", "sub_type":"human"}' \
-H "Content-Type: application/json" \
https://mydomain.com/api/webhook/my_netatmo_webhook

App status shows green checkmark next to webhooks status.
I don't see a log there.