The Meraki Community
Register or Sign in
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • About chengineer
chengineer

chengineer

Meraki Alumni (Retired)

Member since Jan 1, 2018

‎11-23-2020

Shiyue (Shay) Cheng

San Francisco Bay Area

https://www.linkedin.com/in/shiyue/

Groups
  • API Early Access Group

    API Early Access Group

    479
View All
Kudos from
User Count
John-K
Meraki Employee John-K
4
Thibaut-Matzke
Thibaut-Matzke
2
PhilipDAth
Kind of a big deal PhilipDAth
12
BrechtSchamp
BrechtSchamp
4
SteveWeidner
SteveWeidner
1
View All
Kudos given to
User Count
CN
Meraki Alumni (Retired) CN
1
rbnielsen
rbnielsen
1
PhilipDAth
Kind of a big deal PhilipDAth
3
DexterLaBora
Meraki Employee DexterLaBora
3
BrechtSchamp
BrechtSchamp
2
View All

Community Record

184
Posts
177
Kudos
26
Solutions

Badges

Meraki Champion
CMNA
1st Birthday
100 Posts
50 Posts
First 5 Posts View All
Latest Contributions by chengineer
  • Topics chengineer has Participated In
  • Latest Contributions by chengineer
  • « Previous
    • 1
    • 2
    • 3
  • Next »

Re: WebHooks rate limit?

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-05-2019 10:20 AM
‎11-05-2019 10:20 AM
It probably won't be all 20 cameras triggering in the same second, since it'll be delivered a while after the event happens, which depending on when each camera sees the motion could be offset by a few seconds. The motion event alert is independent of the objects seen by MQTT. What did you mean by " WebHook was updated to indicate if a person caused the motion"? ... View more

Re: Air Marshal API calls (not all the expected events are returned)

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-05-2019 10:12 AM
1 Kudo
‎11-05-2019 10:12 AM
1 Kudo
One other update here is if you specify 1000 perPage results, but the Meraki database takes longer than a backend threshold to retrieve the data, you may only receive some number of results less than 1000. Navigating to the next page though will continue where left off. Just note that there can be situations where you may not receive the full number of perPage events requested if the query takes a while. ... View more

Re: Air Marshal API calls (not all the expected events are returned)

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-05-2019 09:56 AM
2 Kudos
‎11-05-2019 09:56 AM
2 Kudos
Investigating this a bit more... the formatting here has to do with URL syntax for GET methods and params that are lists/arrays. For example, if we want to filter on two different types of events, the syntax for the GET URL would be something like  includedEventTypes[]=dhcp_lease&includedEventTypes[]=client_connectivity. To do this in Postman, you would need to add two query params with the same key (screenshot below). However, since Python's params is a dict, the way to pass in the array using requests.get would be to pass in a list for the value, so  params[ 'includedEventTypes[]' ] = ['dhcp_lease', 'client_connectivity']   Postman example ... View more

Re: WebHooks rate limit?

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-05-2019 09:19 AM
‎11-05-2019 09:19 AM
Webhooks fall outside of the RESTful dashboard API limit of five calls per second per organization. In terms of motion alerts though, you'll see that similar to emails that webhooks are summarized, so you won't receive an alert for every second of motion, even if you set "Minimum event duration for trigger" to "1 second", for the same event. ... View more

Re: Processing real time motion alerts, people detection and vehicle detect...

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎11-04-2019 04:10 PM
‎11-04-2019 04:10 PM
So there currently is an issue with firmware 3.33 through 3.36, where the POST call is successful and returns a URL, but the GET on that URL will return the 404 you're seeing a good percentage of the time. If you downgrade to 3.32 that will fix the issue with the GET, and most (just about all) URLs returned should be successfully retrieved. ... View more

Re: Air Marshal API calls (not all the expected events are returned)

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-04-2019 02:16 PM
‎11-04-2019 02:16 PM
In other words, this API endpoint is working as intended, not broken, and just needs the right input data specified. Also, beware that the input for params should be a dict, not a string from json.dumps(). ... View more

Re: Processing real time motion alerts, people detection and vehicle detect...

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎11-04-2019 02:10 PM
‎11-04-2019 02:10 PM
OK, sorry I wasn't clear: I know the POST API call can include a timestamp variable, and what I meant was that you wouldn't be specifying it in "that call" that's made when MQTT is running live. Calm down, no need to try to prove Cunningham's Law by linking to code that I wrote, which by the way has it set to None as an optional parameter, so can be set, but doesn't need to be.   From my testing and that of many other Meraki Engineers, if you request (POST) the snapshot API without timestamp specified, you get a current image. That's what I mean when I said taking a snapshot of that apartment camera shows me walking in the doorway, and not 60 seconds before I entered the apartment. Attached below as proof (timestamp not specified nor used when requesting the image).   Also, there is no 3.66 firmware yet. 🙂 ... View more

Re: mqtt timestamp documentation wrong?

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-04-2019 01:47 PM
‎11-04-2019 01:47 PM
It's milliseconds. Thanks for bringing this to our attention Philip; we'll fix. ... View more

Re: Air Marshal API calls (not all the expected events are returned)

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎11-04-2019 01:24 PM
‎11-04-2019 01:24 PM
Hi guys, since you're doing this in Python, you may want to return the response.text error message to troubleshoot. In this case, I believe the 400 error you're seeing could be either "productType is required" or "'includedEventTypes'" must be an array". The former, which I believe you know this by now, is that for combined networks, you need to specify the  productType for this endpoint to work. For the latter error, if you're trying to filter for specific event types, that needs to be an array/list, so the way to do that using params within requests.get is to specify it as an array, namely 'includedEventTypes[]' as the key for your params dictionary.   Here's an example of a function that will do what you're looking for in Python using the requests library.   # https://api.meraki.com/api_docs#list-the-events-for-the-network def get_event_log (api_key , networkId , productType= None, includedEventTypes= None, excludedEventTypes= None, deviceMac= None, deviceSerial= None, deviceName= None, clientIp= None, clientMac= None, clientName= None, smDeviceMac= None, smDeviceName= None, perPage= None, startingAfter= None, endingBefore= None, retries= 5 ): resource = f'https://api.meraki.com/api/v0/networks/ { networkId } /events' parameters = [ 'productType' , 'deviceMac' , 'deviceSerial' , 'deviceName' , 'clientIp' , 'clientMac' , 'clientName' , 'smDeviceMac' , 'smDeviceName' , 'perPage' , 'startingAfter' , 'endingBefore' ] params = {key: value for (key , value) in locals ().items() if key in parameters and value != None } if includedEventTypes: params[ 'includedEventTypes[]' ] = locals ()[ 'includedEventTypes' ] elif excludedEventTypes: params[ 'excludedEventTypes[]' ] = locals ()[ 'excludedEventTypes' ] while retries > 0 : response = requests.get(resource , headers ={ 'X-Cisco-Meraki-API-Key' : api_key , 'Content-Type' : 'application/json' } , params =params) if response.ok: print ( 'success' ) return response.json() elif response.status_code == 429 : wait = int (response.headers[ 'Retry-After' ]) print ( f'retrying in { wait } seconds' ) time.sleep(wait) retries -= 1 else : message = response.text print ( f'failed with error { response.status_code } , { message } ' ) return None ... View more

Re: Processing real time motion alerts, people detection and vehicle detect...

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎11-04-2019 10:17 AM
1 Kudo
‎11-04-2019 10:17 AM
1 Kudo
To answer the other questions, using the imageUrl in webhooks does not count as an API call for the rate limit, and our API team will look at updating documentation on the Developer Hub. ... View more

Re: Processing real time motion alerts, people detection and vehicle detect...

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎11-04-2019 10:15 AM
1 Kudo
‎11-04-2019 10:15 AM
1 Kudo
MQTT is pretty much live, real-time messages, telling you multiple times a second (as you have noted) the objects seen. If your receiver is processing also in real-time, you'll see objects/counts in the message, and can fire off to take a snapshot right away. That POST API call doesn't include a timestamp, as there's no reason to why since you're asking for a live image of what's going on right now. The only wait time involved is a few seconds for that image to be ready to be retrieved (GET), and typically that takes less than 10 seconds (around five as you noted too).   I have a camera pointed at my apartment front door, and with MQTT, logic that tells me immediately when somebody is seen when I'm not at home. When I come back home, I get an alert consistently within seconds with a snapshot, sometimes before I even have a chance to take off my shoes completely. (This workflow is part of what you can build in the Adventure API lab at cs.co/adventure). ... View more

Re: Processing real time motion alerts, people detection and vehicle detect...

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎11-04-2019 08:10 AM
‎11-04-2019 08:10 AM
That doc doesn't reflect the latest, and webhooks do include an imageUrl parameter that for MV12/22/72 models link to the motion recap image. Also, if you're using MQTT to trigger snapshots, the wait time should only be a few seconds if coded correctly. ... View more

Re: MV web Hooks and Microsoft Teams

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎10-25-2019 12:30 PM
2 Kudos
‎10-25-2019 12:30 PM
2 Kudos
That's correct, as the Meraki webhook format contains data from the Meraki dashboard including information about the organization, network, device, and specific alert. The alert is not just a chat message, which is why you cannot natively ingest it into any messaging application (Webex Teams, Microsoft Teams, Slack, etc.), and will need a transformer/middleware, or an integration, to process it first. We do however, have a public Adventure 1.0 API lab where you can create your own Webex Teams chatbot that processes webhook alerts from your Meraki org, as well as do other things including taking snapshots from motion alerts, MQTT real-time events, and more. ... View more

Re: Processing real time motion alerts, people detection and vehicle detect...

by Meraki Alumni (Retired) chengineer in Smart Cameras
‎10-25-2019 12:27 PM
1 Kudo
‎10-25-2019 12:27 PM
1 Kudo
Hi folks, as you guys have indicated, MQTT can be used with the camera's objection detection model to return, in real-time sub-second, the light level, people in the frame, and on MV72s, vehicles in the frame. Otherwise motion by itself will not be something that MQTT currently detects.   Webhooks can be used to alert on motion events, and are typically sent up to a few minutes after the fact. Also for second-gen cameras (anything apart from MV21/MV71), there is a link in the webhook to the motion/recap composite image if that feature is enabled.   For both MQTT real-time object detection as well as webhook alerts, you can also process to retrieve a snapshot using the API, which can then be passed onto a CV engine if needed for additional analysis.     ... View more

Re: imageUrl field in MV webhook alert

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎09-12-2019 02:59 PM
‎09-12-2019 02:59 PM
Just curious, what model of camera do you have and is the "restricted bandwidth mode" setting enabled or disabled? ... View more

Re: Google App Script to take a MV camera snapshot results in 404 error

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎09-08-2019 08:46 AM
1 Kudo
‎09-08-2019 08:46 AM
1 Kudo
Hi Felix, I finally got a chance to look into this, and the issue has to do how JavaScript/GApps script is handling CORS. The easiest/quickest fix here is to change your URL from https://api.meraki.com to use the shard number, for example https://n118.meraki.com instead. ... View more

Re: Action Batches

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎06-26-2019 09:31 AM
‎06-26-2019 09:31 AM
Ah OK, so across multiple orgs. Maybe asynchronous workflows with multithreading could help, but of course that does add extra complexity. ... View more

Re: Action Batches

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎06-26-2019 08:24 AM
2 Kudos
‎06-26-2019 08:24 AM
2 Kudos
There are a few org-wide device calls (1, 2, and 3) that may be helpful in getting network IDs for all devices? The first will require pagination if you have more than 1000 devices, but the latter two do not.   Also, the blogpost just went live!  https://meraki.cisco.com/blog/2019/06/action-batches-a-recipe-for-success/ ... View more

Re: Action Batches

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎06-26-2019 05:55 AM
2 Kudos
‎06-26-2019 05:55 AM
2 Kudos
Nice and thank you @jdsilva! Also, that's pretty neat hack with Chromecast bypassing the Google Home app! 😛 ... View more

Re: Action Batches

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎06-25-2019 05:17 PM
4 Kudos
‎06-25-2019 05:17 PM
4 Kudos
Hi team, sorry this was missed! We should have a blog post published on action batches in the next few days, and in the meantime, you can try running the demo from Cisco Live two weeks ago with the source code posted here. By the way, I'm super flattered @Nash! ... View more

Re: Python API

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎06-25-2019 05:14 PM
4 Kudos
‎06-25-2019 05:14 PM
4 Kudos
Hi team, sorry that this got delayed by a bit with other projects. We're still working to get this updated in the next few weeks. Apologies!! ... View more

Re: Python API

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎04-29-2019 11:11 AM
8 Kudos
‎04-29-2019 11:11 AM
8 Kudos
Hi guys, we actually are going to update the Python module (https://github.com/meraki/dashboard-api-python/) in the next two weeks! This will include all the pull requests and latest endpoints.   What @jdsilva posted is the Python SDK automatically generated with the new support for OpenAPI specification. Would be curious to hear the Community's feedback on using that SDK in relation to the module. Thanks! ... View more

Re: MV snapshot API not consistent

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎04-25-2019 08:24 AM
1 Kudo
‎04-25-2019 08:24 AM
1 Kudo
Hi @Rafaetero, make sure your API key has write access (since it's a POST call), and also in the headers, only pass in the " X-Cisco-Meraki-API-Key" key/value, and not "Content-Type": "application/json" (since there's a bug if you do). ... View more

Re: MV snapshot API not consistent

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎04-19-2019 07:12 AM
‎04-19-2019 07:12 AM
I'm testing on 3.29, and the wait time goes down to about 30 seconds. If you need something faster than that, then make the API call without passing in the historical timestamp parameter. ... View more

Re: MV snapshot API not consistent

by Meraki Alumni (Retired) chengineer in Developers & APIs
‎04-18-2019 06:13 PM
‎04-18-2019 06:13 PM
Hi webfrank, this issue should be fixed. Are you still seeing snapshots returning a different photo/frame when passing in a historical timestamp, from what you see in dashboard? ... View more
  • « Previous
    • 1
    • 2
    • 3
  • Next »
Kudos from
User Count
John-K
Meraki Employee John-K
4
Thibaut-Matzke
Thibaut-Matzke
2
PhilipDAth
Kind of a big deal PhilipDAth
12
BrechtSchamp
BrechtSchamp
4
SteveWeidner
SteveWeidner
1
View All
Kudos given to
User Count
CN
Meraki Alumni (Retired) CN
1
rbnielsen
rbnielsen
1
PhilipDAth
Kind of a big deal PhilipDAth
3
DexterLaBora
Meraki Employee DexterLaBora
3
BrechtSchamp
BrechtSchamp
2
View All
My Accepted Solutions
Subject Views Posted

Re: MV Video Clip Download

Developers & APIs
3582 ‎07-18-2020 05:42 PM

Re: How to pass array for includedEventTypes

Developers & APIs
1532 ‎06-27-2020 10:55 AM

Re: Switch - Layer 3 interface

Developers & APIs
1573 ‎06-01-2020 02:55 PM

Re: Unable to collect co-termination licenses.

Developers & APIs
1098 ‎05-25-2020 08:08 AM

Re: Get all clients in a group policy

Developers & APIs
1276 ‎04-13-2020 12:52 PM

Re: PYTHON - get_network_traffic_shaping - HTTP response not OK.

Developers & APIs
1711 ‎03-09-2020 01:53 PM

Re: Bug with create organisation network API? Only works when a copy_from_n...

Developers & APIs
2420 ‎01-21-2020 02:54 PM

Re: Dashboard API via Python - unable to get local issuer certificate (pass...

Developers & APIs
8955 ‎01-13-2020 01:46 PM

Re: mqtt timestamp documentation wrong?

Developers & APIs
987 ‎11-04-2019 01:47 PM

Re: Access API simply via browser without an API Key. Trick/Hack/Other? You...

Developers & APIs
2168 ‎08-01-2018 05:42 AM
View All
My Top Kudoed Posts
Subject Kudos Views

Re: Python API

Developers & APIs
8 8007

API Demo Platform - quickly experience Meraki APIs within seconds

Developers & APIs
7 5885

Re: Dashboard API via Python - unable to get local issuer certificate (pass...

Developers & APIs
4 8955

Re: Programming in Python: Follow up QA from the 1/8/2020 Webinar

Developers & APIs
4 3649

Re: Action Batches

Developers & APIs
4 4226
View All
custom.footer.
  • Community Guidelines
  • Cisco Privacy
  • Khoros Privacy
  • Privacy Settings
  • Terms of Use
© 2022 Meraki