Ok, have a webhook on my Presence cameras, I receive them right, but it seems there is a bug sometimes:
When a person in seen, I got this (all xxx are just ofuscating of course):
"app_type":"app_camera",
"snapshot_id":"xxxxxxx",
"snapshot_key":"xxxxxxx",
"event_type":"human",
"camera_id":"xxxxxxx",
"home_id":"xxxxxxx",
"home_name":"xxxxxxx",
"event_id":"xxxxxxx",
"message":"Personne d\u00e9tect\u00e9e par Cam"
But when the person stay, and generate a 'subevent' in the same event (a second thumbnail in the timeline at same hour), I got this:
"app_type":"app_camera",
"event_type":"movement",
"camera_id":"xxxxxxx",
"home_id":"xxxxxxx",
"home_name":"xxxxxxx",
"message":"Mouvement d\u00e9tect\u00e9 par Cam"
In the timeline, I have several thumbnails at the same hour (same event), all being detected as human.
So why does I receive an event_type movement ? And why without any snapshot_id, snapshot_key, event_id ?
Presence webhook bug ?
Presence webhook bug ?
php-simpleNetatmoAPI Simple to use php API based on official API.
Re: Presence webhook bug ?
Something strange: I have not a single disconnection in the timeline.
But my webhook endpoint received this :
18-12-2016 22:33:50
{
"app_type": "app_camera",
"event_type": "disconnection",
"camera_id": "xxxxx",
"home_id": "xxxxx",
"home_name": "xxxxx"
}
18-12-2016 22:33:52
{
"app_type": "app_camera",
"event_type": "connection",
"camera_id": "xxxxx",
"home_id": "xxxxx",
"home_name": "xxxxx"
}
Exact same thing in the same second at 6h54
But my webhook endpoint received this :
18-12-2016 22:33:50
{
"app_type": "app_camera",
"event_type": "disconnection",
"camera_id": "xxxxx",
"home_id": "xxxxx",
"home_name": "xxxxx"
}
18-12-2016 22:33:52
{
"app_type": "app_camera",
"event_type": "connection",
"camera_id": "xxxxx",
"home_id": "xxxxx",
"home_name": "xxxxx"
}
Exact same thing in the same second at 6h54
php-simpleNetatmoAPI Simple to use php API based on official API.
Re: Presence webhook bug ?
Got answer from support:
- An event is seperated into subevents by movements. Only the Event has an id and snapshot, subevents dont have these propreties.
- Such short disconnections ( 2 seconds here) are not show in time line, but will be shown in API for more control over the product.
So I added in my hook script a check to see if there is snapshot or not
- An event is seperated into subevents by movements. Only the Event has an id and snapshot, subevents dont have these propreties.
- Such short disconnections ( 2 seconds here) are not show in time line, but will be shown in API for more control over the product.
So I added in my hook script a check to see if there is snapshot or not
php-simpleNetatmoAPI Simple to use php API based on official API.