/pakistrano-camera-control

Library to make Foscam FI8910W camera control easier

Primary LanguageJavaScript

Pakistrano camera control

With this library you can interact with the foscam camera device family.

Camera server (before you continue reading)

If you are thinking on developing a front webservice for this driver, its almost done at here

Tested models

  • FI8910W

You can see the public promise based interface here

Install via npm

npm install pakistrano-camera-control

Example usage

const PakistranoCameraControl = require('pakistrano-camera-control')
const pakistranoCameraControl = new PakistranoCameraControl({
  host: '127.0.0.1',
  user: 'admin',
  password: 'admin'
})

const sleep = (seconds) => {
  return new Promise(resolve => setTimeout(resolve, seconds * 1000))
}

/// Camera move
(async () => {
    await pakistranoCameraControl.startMoveLeft()
    await sleep(0.5)
    await pakistranoCameraControl.stopAxes()
})()

/// Camera video stream
(async () => {
    const videoStream = await pakistranoCameraControl.getVideoStream()
    videoStream.pipe(process.stdout)
})()

How to run tests

To run all tests you must

# run all tests (you must have a camera available on your network).
# Defaults are admin:admin@localhost
CAMERA_HOST=192.168.1.4 CAMERA_USER=admin CAMERA_PASSWORD=admin npm test

# run unit tests
npm run unit-test

# run integration tests (you must have a camera available on your network)
CAMERA_HOST=192.168.1.4 CAMERA_USER=admin CAMERA_PASSWORD=admin npm test

Motivation - Who is Pakistrano ?

Pakistrano is a smart thief. He's always awaiting for best moment to steal shoes and/or socks. The target is to catch him while hes doing the best that he knows.

image

Authors and maintainers

@zucchinidev @eloylp