项目作者: JanLoebel

项目描述 :
Network IP Camera Application Programming Interface (NIPCA) - Client
高级语言: JavaScript
项目地址: git://github.com/JanLoebel/nipca.git
创建时间: 2019-02-27T21:46:58Z
项目社区:https://github.com/JanLoebel/nipca

开源协议:MIT License

下载


Network IP Camera Application Programming Interface (NIPCA) - Client

A node.js client to connect to NIPCA, which is a protocol for some Network IP Cameras e.g.: DLINK DCS-8200LH.

npm version

Description

Provides a node.js client to access NIPCA based IP Cameras. Tested with node.js 10 and DLINK DCS-8200LH.

Some of the cameras seems to support Basic Authentication by suppling the credentials by base64(username:password). In my case (with the DLINK DCS-8200LH) this wasn’t working, therefore I had to reverse engineer the authentication protocol there.

Install

  1. npm install nipca --save

Usage

This is a code example to show how to use this library.

  1. const Nipca = require("nipca");
  2. const baseUrl = "http://192.168.0.10"; // IP of the camera
  3. const user = "admin"; // User
  4. const password = "753776"; // Pin-Code (backside of the camera)
  5. new Nipca(baseUrl)
  6. .login(user, password)
  7. .then(nipcaClient => {
  8. nipcaClient.fetchInfo().then(res => console.log("fetchInfo:", res));
  9. })
  10. .catch(err => console.error("Error", err));