IP Camera Controller (Dahua & HikVision)

Moderator: leecollings

Post Reply
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

IP Camera Controller (Dahua & HikVision)

Post by nayr »

Goal: Turn your Dahua or Hikvision Security Cameras into Domoticz Motion Detectors, along with Alarm Inputs and Video Tampering.

download/source: https://github.com/nayrnet/domoticz-ipcc

Rebranded Manufacturers that might work: QSee, Swann, Lorex, Foscam, EyeSurv, and more.. many vendors simply rebrand Dahua and HikVision products so do some research to find out who really made your camera.

Event Features:
  • Video Motion Detection
  • Alarm Inputs (Dry Contacts)
  • Video Blank, Video Loss Tamper Devices
What it does: Maintains an open connection to your camera's alarm stream, any alarms that are set off are instantly transmitted to Virtual Motion Detectors and Contact Switches within Domoticz.

How its implemented: NodeJS and MQTT, it also exposes the raw sensor data via generic MQTT (no json) so it can be integrated with other platforms easily as well.

Will it run on Windows?: No, requires a unix tcp sockets to quickly detect a network problem and try to reconnect.

To Do List:
  • ONVIF Profile S Cameras
  • PTZ Commands
  • Alarm Outputs
  • Day/Night Profile Switching
  • Wrap Up HikVision Support
Last edited by nayr on Sunday 21 February 2016 5:36, edited 16 times in total.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: IP Camera Controller (Dahua)

Post by nayr »

I dont have any Hikvision cameras but I know they are very popular, so I was scoping out there API docs and it looks like they have an alarm stream much like my Dahua's.. so I am trying to arrange to get access to a Hikvision camera remotely so I can add support for both vendors.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: IP Camera Controller (Dahua & HikVision)

Post by BakSeeDaa »

I must say that I'm very excited about your nice project. While waiting for the Hikvision code to become ready I've prepared a little bit. :lol:

Does the the following MQTT configuration suit for domoticz-ipcc? Thanks!
Untitled.png
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by nayr »

yep :lol:
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by Minglarn »

This is getting better and better!

Keep up the good work nayr! Cant wait for the HikVision code!
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: IP Camera Controller (Dahua & HikVision)

Post by BakSeeDaa »

Me too, I'm also waiting. I have 5 of those Hikvision cameras now. :lol:
HoLeeShiet
Posts: 26
Joined: Tuesday 18 March 2014 21:19
Target OS: -
Domoticz version:
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by HoLeeShiet »

great! I also have Hikvision cameras and would love to try!
Using Tapatalk
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by Heisenberg »

Has anyone succesfully use this with Hikvision? Does it matter what model of Hikvision you have?
Is it possible to have Hikvision camera switch on a group of lights when motion detected? If yes, how should the script look like?
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: IP Camera Controller (Dahua)

Post by BakSeeDaa »

nayr wrote:I dont have any Hikvision cameras but I know they are very popular, so I was scoping out there API docs and it looks like they have an alarm stream much like my Dahua's.. so I am trying to arrange to get access to a Hikvision camera remotely so I can add support for both vendors.
Hi Ryan!

Did You ever get access to a Hikvision camera remotely? Since I have a couple of them, I can set up remote access for You. Please let me know. Please also say if You think there is any other way for us to support this project. I'd be happy to donate a crate of beers or whatever :lol: Your work is worth a lot for me.
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by Thomasdc »

someone got any progress with this?

im looking for a way to use my cam's for motion detection..

but all my cams are conected to an linux NVR (so the cams are in separated network ) but the nvr is in my network.. i would like to be able to trig a json link or something from the nvr.. so the nvr tells domoticz there was movement at a certain camera (its the camera that tells it to the NVR.. so now i woul like the NVR telling ti to Domoticz .. its linux.. so should be possible no? its an: Hikvision DS-7716NI-SP

In hikvision you have something like 'notify surveillance center' when selecting this its possible to send notification to the hikvison app on your android phone.. wouln't it be possible to make some 'surveillanc' center' on domoticz? and then when you enter the ip of domoticz into the ' notify surveillance center ip alarm' those notifications appears in domoticz (so this way a switch can be linked to an incomming notificaiton from hikvisonà
dilepa
Posts: 8
Joined: Thursday 16 June 2016 6:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by dilepa »

Hi,

am a newbie, just followed the instructions, got everything installed.

When i run ./daemon start i get cannot find module 'node-dahua-api'

and gives errors.

Any ideas?
uronito
Posts: 10
Joined: Tuesday 04 October 2016 20:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by uronito »

Hi,

Works like a charm!!!!!!!! it's Fantastic!!!!!

Can you implement ptzpresets and night/day profile by mosquito and switches in domotic?

Thanks for your effort!!!!!!!!!
User avatar
proohu01
Posts: 95
Joined: Friday 17 October 2014 12:20
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by proohu01 »

I've tried to get this working several times now. Still without success. This time I stated with a clean and fresh Jessie Lite.

The installation end with the following error:

Code: Select all

make: Leaving directory '/home/pi/ipcc/node_modules/unix-dgram/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.35-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/ipcc/node_modules/unix-dgram
gyp ERR! node -v v7.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/unix-dgram):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
If I try to start the deamon anyway, I get the same error as dilepa. Logical I gues because the installation didn't complete. Am I missing some dependancy?
Last edited by proohu01 on Friday 16 December 2016 19:53, edited 1 time in total.
Pi 2 B | Pi Camera | PiFace 2 | RFXtrx433E (KaKu + Oregon Scientific) | Plugwise (9 Circles) | Aeon Z-Wave stick (Fibaro - dimmers, sockets, RGB, screens/blinds) | RFXMeter (Kwh/water/gaz) | WOL | Onkyo Receiver | RTC | Hikvision | Netatmo | Satel Integra
uronito
Posts: 10
Joined: Tuesday 04 October 2016 20:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by uronito »

With the last firmware of dahua ip Cam (09/10/2016) Dahua Node Api cant connect to the cam, i think could be by autenthication method.

ipcc for domoticz cant connect to the cam at last firmware.

With the earlier firmware can connect.

In the new firmware, dahua uses digest autenthication, Can you implementing?

Thanks!!!!

Regards
juppiejo
Posts: 3
Joined: Thursday 08 December 2016 23:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: IP Camera Controller (Dahua & HikVision)

Post by juppiejo »

What would be the direction for the HikVision IPC's to work? I changed node-dahua-api into node-hikvision-api in server.js, but that shortcut didn't do the trick...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests