0.1.1 • Published 3 years ago

hikvision-mdns v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Hikvision mDNS

npm version Build Coverage Status

A HikVision discovery tool using mDNS/ZeroConf/Bonjour

npm i hikvision-mdns

This library is little more than a wrapper around node-dns-sd, but more functionality is planned in the future.

Usage

Simply call discoverCameras(), which returns a Promise containing an array of cameras:

[
  {
    address: '10.0.1.166',
    name: 'HIKVISION DS-2CD2722FWD-IZS - 733050127',
    serial: 'DS-2CD2722FWD-IZS20170321BBWR733050127',
    partialSerial: '733050127'
  }
]

You can optionally pass a greater timeout value to discoverCameras() to increase the search time. The default is 5 seconds.

CLI

You can run discoverCameras after installing the package globally from the command line like so:

$ discoverCameras

Additionally, you can specify the timeout like so, scanning for ten seconds:

$ discoverCameras 10

Alternatively, you could use npx:

$ npx hikvision-mdns

The CLI tool outputs raw, but formatted, JSON:

[
  {
    "address": "10.0.1.215",
    "name": "HIKVISION DS-2CD2955FWD-IS - 236286152",
    "serial": "DS-2CD2955FWD-IS20190709AAWR236286152",
    "partialSerial": "236286152"
  },
  {
    "address": "10.0.1.166",
    "name": "HIKVISION DS-2CD2722FWD-IZS - 733050127",
    "serial": "DS-2CD2722FWD-IZS20170321BBWR733050127",
    "partialSerial": "733050127"
  },
  {
    "address": "10.0.1.164",
    "name": "HIKVISION DS-2CD2722FWD-IZS - 733050075",
    "serial": "DS-2CD2722FWD-IZS20170321BBWR733050075",
    "partialSerial": "733050075"
  },
  {
    "address": "10.0.1.165",
    "name": "HIKVISION DS-2CD2722FWD-IZS - 733050169",
    "serial": "DS-2CD2722FWD-IZS20170321BBWR733050169",
    "partialSerial": "733050169"
  }
]
0.1.1

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago