Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

j3lte/node-motion

Repository files navigation

node-motion

NPM

DAVID npm version Development Dependency Status Code Climate

NodeJS terminal client for managing Motion

It is a simple wrapper for the motion package that can be used on Linux boxes to view a usb connected webcam. It will spawn motion and a simple express server to view the cam.

  • It can use a JSON file that represents a .conf file (see configs)
  • It can use a valid motion.conf file (see examples)
  • It uses a JSON file in config/ (see example config) to create a temporary motion.conf file. Values can be overridden with the client

Usage

Install Node.js if you don't have it yet. Then from the command line:

[sudo] npm install node-motion -g

Then proceed as follows:

node-motion [options] [configfile]

See client output

Prerequisites

  • Only works on Linux (tested and developed on Ubuntu 14.04 & Raspberry Pi)
  • Needs the motion package installed (sudo apt-get install motion), currently works on:
    • Motion version 3.2.12
    • Motion version 3.2.12+git20140228

Bugs / issues / features

Please, if you find any bugs, or are a way better developer than I am (as in, you are thinking 'spaghetti' when looking at my code), feel free to create an issue. If you have features or addons for compatibility, please add a pull request!

(The MIT License)

Copyright (c) 2015 Jelte Lagendijk jwlagendijk@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.