Coder Social home page Coder Social logo

ciscodevnet / meraki-camera-notification Goto Github PK

View Code? Open in Web Editor NEW
9.0 17.0 6.0 536 KB

Leverage Meraki camera API and MQTT capability to create a notification service

License: Other

Dockerfile 2.13% Python 97.87%
meraki api webex-teams python

meraki-camera-notification's Introduction

Meraki Camera Notification Example

published

Leverage Meraki new camera API and MQTT capability to create a notification service. When the camera detects a person consistently appears in a particular zone the service will send a Webex team message to a Webex team room with a video link which will directly go to the video footage when that even occurred. This is useful for alerting unexpected person movement in off-hours.

API and technology

API

Camera API: Returns video link for the specified camera. If a timestamp supplied, it links to that time.

MQTT and setting:

  1. Go to Cameras > [Camera Name] > Settings > Sense page.
  2. Click Add or edit MQTT Brokers > New MQTT Broker and add you broker information. For testing/trial you can find public broker at here.
  3. You can install MQTT.fx to subscribe to MQTT broker. This is a very useful tool

Build locally

Config

Configurations in app.py

General API and MQTT configurations

Name Description
MQTT_SERVER MQTT Broker ip or domain
MQTT_PORT MQTT Broker port
MQTT_TOPIC Meraki Camera mqtt top, default is "/merakimv/#"
MERAKI_API_KEY Meraki Api key
NETWORK_ID Camera's network ID, will use this get video link with camera api
COLLECT_CAMERAS_SERIAL_NUMBERS Array of cameras serial numbers, all is *.
COLLECT_ZONE_IDS Array of zone id, all is *

Motion detected configurations, you can keep this as it.

Name Description
MOTION_ALERT_PEOPLE_COUNT_THRESHOLD The threshold of people count from the camera to start the detection mode
MOTION_ALERT_ITERATE_COUNT The iterate count when in the detection mode
MOTION_ALERT_TRIGGER_PEOPLE_COUNT After threshold of people count after iteration to trigger the alert or not
MOTION_ALERT_PAUSE_TIME The pause time after alert is triggered

Configurations in Webexteam.py

Name Description
WEBEXTEAMKEY The Webex team API key
ROOM_ID The Webex team room ID

Build

  1. Run python3 install -r requirement.txt
  2. Run python3 app.py

Docker

Build : docker build -t meraki-camera-notification .

Run : docker run -it meraki-camera-notification .

meraki-camera-notification's People

Contributors

abdvl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meraki-camera-notification's Issues

dont sent info to webex teams

hello

Is there any particular version of python that you are using?
the bot is running and uses a MQTT broker , iam using windows , pythoon 3.6.6 meraki mv22
works but dont sent info or image to my webex teams room

regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.