hikvision-mdns
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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"
  }
]

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.11latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.11
0.1.00
0.0.90
0.0.81
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20

Package Sidebar

Install

npm i hikvision-mdns

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

5.77 kB

Total Files

4

Last publish

Collaborators

  • 128keaton