>That doc doesn't reflect the latest,
@CameronMoody the documentation at
https://developer.cisco.com/meraki/
is becoming stale. Who looks after that? There are at least two corrections that need ot be made now.
I'm using node.js. I wait for MQTT to send me a message I'm interested in. Potentially the event might have been recorded just 50ms ago. Because I know the Meraki API doesn't respond straight away I use setTimeout to call my code at a later time. In the example below, it calls a function called processSnapshot which makes a request to the snapshot API to get a URL of the image.
setTimeout(processSnapshot, 60000, netID, cameraSerial,new Date(ts).toISOString(),processPerson,0)
The 60000 causes the code to be called in 60s. If I make the number small - I get the API returning error codes. Basically you can't seem to request a snapshot for an event that the camera has only just recorded. You have to wait till it has had it for 60s or so.
Note this only happens if you request the timestamp to get the exact moment in time the the camera detected the person/vehicle. If you leave the timestamp out you can make the request for the frame "now" - except it isn't really now.
Once I have the snapshot response I have to wait another 5s or so and then request the actual image.
I don't think I have coded it wrong. The only difference between it working and not working are the timer values.
If you really think I should get a response to my snapshot request within a couple of seconds do you think perhaps there is a fault with the shard I am on? I'd open a case with support ... but I doubt they could help. Because this is an MQTT triggered event you can't just supply some code (such as curl) to reproduce the issue.
I am now very interested in using Webhooks. This would save me having to use the dashboard API, and get around the 5 requests per second limit. I'm assuming that if you retrieve the image via the URL in the Webhook that it doesn't count against you?
Also if you have any influence (and yes I have made a wish) I would love the jpeg images to be higher quality (aka use less compression). I'm trying to pass the images often to subsequent systems for machine processing and there is a noticable quality deteriation between the recorded video and the single jpeg returned.