node-hikvision-api
NodeJS Module for communication with Hikvision IP Cameras.
Status: Work in Progress
Example:
#!/usr/bin/nodejsvar ipcamera = ; // Options:var options = host : '192.168.1.100' port : '80' user : 'admin' pass : 'password123' log : false; var hikvision = options; // Switch to Day Profilehikvision // PTZ Go to preset 10hikvision // Monitor Camera Alarmshikvision; { var date = ; var hour = date; hour = hour < 10 ? "0" : "" + hour; var min = date; min = min < 10 ? "0" : "" + min; var sec = date; sec = sec < 10 ? "0" : "" + sec; var year = date; var month = date + 1; month = month < 10 ? "0" : "" + month; var day = date; day = day < 10 ? "0" : "" + day; return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;}
Functions:
// Switch Camera to Night Profilehikvision // Switch Camera to Night Profilehikvision // Issue hikvision RAW PTZ Command (See API Manual in GitHub Wiki)hikvision // Go To Presethikvision // PTZ Zoom, input level: positive = zoom in / negative = zoom outhikvision // PTZ Move// Directions = Up/Down/Left/Right/LeftUp/RightUp/LeftDown/RightDown// Actions = start/stop// Speed = 1-8hikvision // Request current PTZ Statushikvision // Callback for any Alarm (Motion Detection/Video Loss & Blank/Alarm Inputs)hikvision; // Callback for PTZ Statushikvision; // Callback on connecthikvision; // Callback on errorhikvision;
Options
- host - hostname of your hikvision camera
- port - port for your hikvision camera (80 by default)
- user - username for camera
- pass - password for camera
- log - boolean to show detailed logs, defaults to false.
More Info:
- Support & Discussion:
About:
By: Ryan Hunt