Skip to content

denapom11/MerakiLocationScanningPythonFlask

Repository files navigation

Meraki Location Scanning Python Receiver

A basic web service to accept Location Scanning data from a Cisco Meraki network

  • Accept a GET request from Meraki and respond with a validator
  • Meraki will POST to the server, if validated.
  • POST will contain a validator and a secret, which can be verified by the server.
  • JSON data will be in the data object POST

Prerequisites

locationscanningreceiver.py

  • The basic app will show the "blue-dot" location of the clients on a map
  • To launch from python directly: python3 locationscanningreceiver.py -v <validator> -s <secret>
  • To launch via flask:
export FLASK_APP=locationscanningreceiver.py -v <validator> -s <secret>
flask run -h 0.0.0.0
 * Running on http://0.0.0.0:5000/

locationscanningreceiver-mongodb.py

  • Extends the basic app by placing data into a local MongoDB database to save historical data.
  • Requires https://www.mongodb.com/
  • Requires pymongo (pip install pymongo)
  • To launch from python directly:
    • mkdir mongodata
    • mongod --dbpath=./mongodata --nojournal
    • from another terminal or command line window: python3 locationscanningreceiver-mongodb.py -v <validator> -s <secret>
  • To launch via flask:
    • mkdir mongodata
    • mongod --dbpath=./mongodata --nojournal
    • from another terminal or command line window:
    export FLASK_APP=locationscanningreceiver-mongodb.py -v <validator> -s <secret>
    flask run -h 0.0.0.0
     * Running on http://0.0.0.0:5000/
    

Defaults

ngrok http 5000

Then use the new url it creates as your base URL: https://.ngrok.io/

Cisco Meraki Location Scanning API Documentation

https://documentation.meraki.com/MR/Monitoring_and_Reporting/CMX_Analytics#CMX_Location_API

Initial code written by Cory Guynn

2016

http://www.InternetOfLEGO.com

Extended by Matt DeNapoli

2017

https://developer.cisco.com

About

This project is a full python flask web application implementation of a Meraki Location Scanning listener that serves up a web page plotting the locations of the clients being tracked

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors