Giter Site home page Giter Site logo

rxm307 / zmonvif-events Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rostislavzz/motion-onvif-events

0.0 0.0 0.0 16 KB

A JS CLI tool that attempts to bridge the gap between your ONVIF camera's motion detection and Zoneminder.

JavaScript 88.73% Dockerfile 11.27%

zmonvif-events's Introduction

motion-onvif-events

A JS CLI tool that attempts to bridge the gap between your ONVIF camera's motion detection and Zoneminder.

Forked from zmonvif-events to add Docker support.

Why?

In a typical Zoneminder installation the server will do video processing to determine which frames have motion. Unfortunately this task is quite CPU intensive.

Fortunately some ONVIF cameras have built in motion detection features, which notify subscribers when an event occurs.

This tool connects to an ONVIF camera and subscribes to these messages. When the motion state changes, it uses Zoneminder's API to arm the selected monitor

Install

npm install -g zmonvif-events

Usage

zmonvif-events --help
usage: zmonvif-events [-h] -z ZM_BASE_URL -i ZM_MONITOR_ID -c HOSTNAME
                         [-u USERNAME] [-p PASSWORD]

Optional arguments:
  -h, --help            Show this help message and exit.
  -z ZM_BASE_URL, --zm-base-url ZM_BASE_URL
                        Base URL for the Zoneminder instance (with trailing
                        slash)
  -i ZM_MONITOR_ID, --zm-monitor-id ZM_MONITOR_ID
                        The ID of the monitor in Zoneminder
  -c HOSTNAME, --hostname HOSTNAME
                        hostname/IP of the ONVIF camera
  -u USERNAME, --username USERNAME
                        username for the ONVIF camera
  -p PASSWORD, --password PASSWORD
                        password for the ONVIF camera

Example

zmonvif-events \
      --zm-base-url http://my-zoneminder-instance.com/zm/ \
      --zm-monitor-id 1 \
      --hostname 192.168.1.55 \
      --username supersecretusername \
      --password dontshareme
[camera 1]: Started
[camera 1]: CellMotionDetector: Motion Detected: true
[9/1/2019, 5:33:39 PM] Setting camera 1 to state true
[camera 1]: CellMotionDetector: Motion Detected: false
[9/1/2019, 5:33:40 PM] Setting camera 1 to state false
[camera 1]: CellMotionDetector: Motion Detected: true
[9/1/2019, 5:33:42 PM] Setting camera 1 to state true
[camera 1]: CellMotionDetector: Motion Detected: false

Docker

Environment variables

  • ZM_BASE_URL - Base URL for the Motion instance (with trailing slash)
  • ZM_MONITOR_ID - The ID of the camera in Motion
  • HOSTNAME - hostname/IP of the ONVIF camera
  • USERNAME - username for the ONVIF camera
  • PASSWORD - password for the ONVIF camera

zmonvif-events's People

Contributors

nickw444 avatar rostislavzz avatar rxm307 avatar

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.