Webhooks problem

robert

Hello,

I own two Netatmo Outdoor Cameras for 5+ years.

I could never make them work properly with webhooks, though tried many times. I gave it time, thinking maybe it was a software issue that would be solved in future updates, but I see the development has stalled.

Anyway tried again with recently discovered https://webhook.site and it still doesn't trigger any traffic.I tried setting the webhook URL via app form but setting it doesn't make it work.

Tried also by API. I have no idea if there can be only one webhook or how many webhooks are currently set. This also don't send anything to https://webhook.site.

Can I do anything to make it work? I need the API to call my URL on every event detected.

0

Comments

4 comments

  • Comment author
    Leslie Community moderator

    Hello Robert,

    Did you try to perform a new /authorize request after setting your webhook URI ? (https://dev.netatmo.com/apidocumentation/oauth#authorization-code) 

    You should then retrieve your first webhook answers after a few minutes in webhook.site

    Have a good day,

    Leslie - Community Manager

    1
  • Comment author
    Leslie Community moderator

    Hello,

    That's strange, in main cases just redo an /authorize request fixes this

    For information, here are the reasons that could lead to a webhook ban : 

    • If you have exceeded the rate limits. It lasts until we arrive in the new time slot, and you can't unban it (https://dev.netatmo.com/guideline#rate-limits)
    • If your IP generates more than 150 4xx errors per minute. The ban lasts 1 hour and you can't unban manually. You have to wait
    • If your app doesn't respond 200 to your webhook more than 5 times in a row (timeout is set at 14 seconds). This ban lasts 24 hours and you can unban yourself on the developer portal (max 10 times in a row for 24 hours)

    I agree the webhook documentation (and the general one) needs improvement, it's something we will work on in the next few months. For information, if you define a webhook uri via the /addwebhook endpoint, you don't need to define it in your app's details

    Have a good day,

    Leslie - Community Manager

    1
  • Comment author
    robert

    Hello!

    Tried everything again (re-auhorized, got new token, set webhook via /api/addwebhook using the access token). Then initiated some recognition events. Didn't work, so also set the same webhook on https://dev.netatmo.com/apps. Meanwhile got messages about banned webook twice, so I tried everything again blindly and finally got the events in Webhook.site. They seem to work properly.

    So... thanks! It is really unclear what happens under the hood, so if I can suggest something it would be:
    - adding more information in Webhooks section of "https://dev.netatmo.com/apps/" - now it's impossible to tell if any webhooks are currently set by API
    - siplifying or adding some information about how "webhook URI" input field relates to webhooks set by API (can the same URL be set twice? can I delete "webhook URI" by API?)

    0
  • Comment author
    robert

    This is a really valuable information - thank you!

    0

Please sign in to leave a comment.