This script collection helps you getting started to get data out of Meraki MV cameras and Meraki MT sensors from the Cloud and via MQTT locally.
(1) Python dependencies: Install on your own the required Python libraries which are different for each script.
(2) Running Mosquitto MQTT broker (for MQTT scripts only)
docker pull ecplipse-mosquitto:1.6
docker run -p 1883:1883 eclipse-mosquitto:1.6
(3) Setup MQTT broker on the Meraki dashboard (for MQTT scripts only.
Script: mt_get_historical_sensor_readings.py
Get historical sensor readings based your defined timespan and granularity.
Script: mt_get_latest_sensor_reading.py
Get the latest sensor reading from your desired sensor.
Script: mv_custom_ml_model_inference_tensorflow.py
This script shows how you can get the live video stream from the MV camera and check the received video frame against your ML model built with Keras/Tensorflow.
In this example, the image will be cropped at first and then predicted against the model.
Script: mv_get_mqtt_data.py
Connecting via paho MQTT client to the MQTT broker (e.g. Mosquitto) and getting all plain MQTT topics / sensor data from the MV camera.
Try out this fire alarm video for the MV camera to record the audio and detect the fire alarm.
Sample Output:
Lux: 7.0
In zone Zone_Right are 1 person(s).
ALARM! fireAlarm
Lux: 7.0
Lux: 7.0
Audio Level (dB): -45
Lux: 7.0
Lux: 7.0
In zone Zone_Right are 1 person(s).
ALARM! fireAlarm
Lux: 7.0
Lux: 7.2
In zone Zone_Right are 1 person(s).
Lux: 7.0
Audio Level (dB): -42
Script: mv_read_rtsp_stream.py
Simply receive the RTSP video stream from the MV camera with OpenCV.
Script: mv-mt_get_snapshot_when_door_was_opened.py
Specify the serial number of the MT door sensor and also the serial number of the MV camera where the snapshots should be taken.
The snapshots will then be downloaded, the name of the .jpeg file is the UNIX timestamp.
1.0 - Inital commit with 6 sample scripts.
- Flo Pachinger - Initial work - flopach
This project is licensed under the Cisco Sample Code License 1.1. - see the LICENSE.md file for details