Code Monkey home page Code Monkey logo

foscam-client's Introduction

Node Foscam Client

npm version Build Status Coverage Status Gitter Dependency Status

Node client sdk for current HD foscam cameras that stream H.264 like the FI9821W, FI9831P, etc..

This is an early release and is not a fully functional SDK. Please open tickets and submit pull request as bugs are found. Until a 1.0.0 release, all 0.x.0 releases are considered major and may contain breaking changes, see CHANGELOG.md for release details.

Example Usage

Install using npm: npm install foscam-client

var Foscam = require('foscam-client');

var camera = new Foscam({
  username: 'my-username',
  password: 'bad-password1',
  host: '192.168.0.50',
  port: 88, // default
  protocol: 'http', // default
  rejectUnauthorizedCerts: true // default
});

// Get saved presets on the camera
var getPointList = camera.getPTZPresetPointList();

// Once the presets are received - print the list to the console and move to the 3rd saved preset
var gotoPresetPoint = getPointList.then(function(pointList) {
    console.log('PTZ Point List:' + JSON.stringify(pointList));
    
    // Note that ptzGotoPresetPoint's promise is fulfilled as soon as the command is received by the
    // camera. There is no way to block until the camera has finished moving to the location.
    return camera.ptzGotoPresetPoint(pointList.point3)
});

// Once the ptzGotoPresetPoint command is finished - snap a picture
var snapPicture = gotoPresetPoint.then(function(){
    return camera.snapPicture2()
});

// Once the picture is snapped - do something with it
snapPicture.then(function(binaryJpg){
    // do something with the binary jpg
});

Docs

Docs: http://lightswitch05.github.io/foscam-client

Generate Docs: npm run docs

Development

  • Install dependencies
    • npm install
    • npm install --global gulp
  • Run lint and tests
    • gulp

foscam-client's People

Contributors

lightswitch05 avatar lijamez avatar rooi avatar vitosamson avatar

Watchers

 avatar  avatar  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.