Webhook question NOC

The Netatmo API is a set of webservices allowing developers and third parties to access Netatmo device's data.
Post Reply
bernardstef
Posts: 4
Joined: 10 Mar 2021, 16:27

Webhook question NOC

Post by bernardstef »

Hi,

I have a (maybe!) dumb question...

I'm trying to improve responsiveness on a home-made automation setup, using webhook from Presence camera. I'm using Node-red.
I'm using Tasker on a dedicated Android tablet, it works but causes a delay...

Unfortunately, I receive only webhook messages from my Netatmo thermostat (when changing temp), but nothing from the Presence camera when i get in front of it.

I filled in the webhook and redirect URL on my app setup.

Am I missing something, maybe a simple step ?
Thanks in advance !
Sans titre 2.jpg
Sans titre 2.jpg (74.91 KiB) Viewed 1114 times
kiboost
Posts: 676
Joined: 21 Jun 2013, 09:27

Re: Webhook question NOC

Post by kiboost »

You can use this php script to just connect to your app with login/pass/id/secret : https://github.com/KiboOst/php-simpleNetatmoAPI

It will set all known scopes, then you will receive every webhook event. I recently enable doorbell events on my webhook like this.

Otherwise, didn't found anything to set them on netatmo dev site.
php-simpleNetatmoAPI Simple to use php API based on official API.
bernardstef
Posts: 4
Joined: 10 Mar 2021, 16:27

Re: Webhook question NOC

Post by bernardstef »

Awesome ;)
I'll try that tomorrow and will get back ! thanks for taking the time to answer at my question

It would be great, indeed, to have some "check boxes" about the events you want to receive on the app settings.
bernardstef
Posts: 4
Joined: 10 Mar 2021, 16:27

Re: Webhook question NOC

Post by bernardstef »

ugghhh

For NOC , It strangely seems to be working for a few seconds after I used your activation function and callback file! ... I get the JSON values in Node-Red...

Then after 5 seconds or so, if I change settings (light, surveillance on/off) , no notification ...
I launch setWebhook($endpoint) once again, and for a few seconds, it works..
Strangely, the thermostat events are still coming through, no problem..

Disabling webhooks works also, I stop receiving them.

Will try again tomorrow :?

Thanks for your nice work ! It helps me a lot and I haven't used php this much before :D
Sans titre.png
Sans titre.png (19.72 KiB) Viewed 1104 times
bernardstef
Posts: 4
Joined: 10 Mar 2021, 16:27

Re: Webhook question NOC

Post by bernardstef »

Well, I had a conflict with a node red module, used to get information from the thermostat, every 20 seconds (this one seems to change the scopes!).

I created another app dedicated to the callback, created a callback server on a raspberry and here we are !
Excellent !

Big thanks for the help :) :)
159367833_2845403772373793_671200844260204715_n.jpg
159367833_2845403772373793_671200844260204715_n.jpg (265.73 KiB) Viewed 1089 times
kiboost
Posts: 676
Joined: 21 Jun 2013, 09:27

Re: Webhook question NOC

Post by kiboost »

Yes I had such problem a few months ago, I have some plugins on Jeedom that get weather station info and such, and it broke webhook for a few hours.
I also ended created two apps, one for getting data and one for scripting/doing more stuff and all works nice since that.
php-simpleNetatmoAPI Simple to use php API based on official API.
Post Reply

Return to “Netatmo API”