Author Topic: Hikvision camera as motion sensor  (Read 5955 times)

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Hikvision camera as motion sensor
« on: March 09, 2016, 07:13:21 pm »
Does anyone have an easy way to get a Hikvision camera's motion, line or intrusion detection trigger to notify Vera? I currently have it working via Blue Iris triggering a virtual motion detector, but I'd like to be direct from the camera to Vera. There seems to be an extensive HTTP API for the camera (http://www.hikvisioneurope.com/portal/index.php?dir=Integration%20and%20Development%20Materials/00%20%20%20CGI/&file=HIKVISION%20CGI%20IPMD%20V1.5.9.pdf).

There seems to be a mechanism once Vera would establish a connection to have the event notification to be sent, but it's above my coding ability.

Thanks

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5621
  • Karma: +155/-376
Re: Hikvision camera as motion sensor
« Reply #1 on: March 09, 2016, 07:41:29 pm »
Does anyone have an easy way to get a Hikvision camera's motion, line or intrusion detection trigger to notify Vera? I currently have it working via Blue Iris triggering a virtual motion detector, but I'd like to be direct from the camera to Vera. There seems to be an extensive HTTP API for the camera (http://www.hikvisioneurope.com/portal/index.php?dir=Integration%20and%20Development%20Materials/00%20%20%20CGI/&file=HIKVISION%20CGI%20IPMD%20V1.5.9.pdf).

There seems to be a mechanism once Vera would establish a connection to have the event notification to be sent, but it's above my coding ability.

Thanks

As far as I know you can't as the camera doesn't fire off an http based on motion. But you can have the camera trigger an alert which blue iris can read. I use this to get a double layer of motion.

I'm not sure what your end game is but if you post more information maybe we can help.

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Hikvision camera as motion sensor
« Reply #2 on: March 09, 2016, 08:19:57 pm »
The end game is not not use Blue Iris. I have an NVR to record all my video. I just want the camera and Vera to "talk" when motion is detected. Make sense?

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5621
  • Karma: +155/-376
Re: Hikvision camera as motion sensor
« Reply #3 on: March 09, 2016, 08:38:47 pm »
The end game is not not use Blue Iris. I have an NVR to record all my video. I just want the camera and Vera to "talk" when motion is detected. Make sense?

Yes, but since the cameras can't send http commands based on triggers you gonna have to come up with another plan. The camera's do output an alarm trigger which blue iris watches for. Im asumming you can do somthing with that, but i dont think vera can do it alone. Your NVR isnt good enough to send http commands?

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Hikvision camera as motion sensor
« Reply #4 on: March 09, 2016, 09:05:22 pm »
Sadly, no the NVR will not send HTTP trigger either.
I still think there is a way to do it with the HTTP API on the camera.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5621
  • Karma: +155/-376
Re: Hikvision camera as motion sensor
« Reply #5 on: March 09, 2016, 11:38:03 pm »
Sadly, no the NVR will not send HTTP trigger either.
I still think there is a way to do it with the HTTP API on the camera.

There is not, and has bee researched before.

Only way is to have script to watch for the alarm output trigger from the camera, this is how blue iris does it along with the actual Hikvision NVR does it. But your going to need someone to build that into something that vera can run so you don;t have to rely on an outside source. You can ask Hikvision this question directly for your confirmation.  Their HTTP API is for inputs to the camera not for making the camera send an ouput of your choice.

What NVR is better then Blueiris anyways?

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Hikvision camera as motion sensor
« Reply #6 on: March 10, 2016, 08:08:27 am »
My NVR is not better than Blue Iris. It's a Hikvision (7616). The only reason I'm trying to get away from Blue Iris is to avoid running a dedicated PC. The NVR consumes a lot less power and generates a lot less heat. Blue Iris is a great package, just very resource intensive.

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Hikvision camera as motion sensor
« Reply #7 on: March 10, 2016, 09:32:15 am »
Here is some code that is doing what I think Vera could do in a plug in: https://github.com/nayrnet/node-hikvision-api
Establish connection to camera, then monitor for an alarm.

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Hikvision camera as motion sensor
« Reply #8 on: March 11, 2016, 11:36:54 am »
Is Vera capable of keeping the HTTP connection running and listening for an alarm response? Or would this be too taxing on it's limited resources? Or does it not like background code running?

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5621
  • Karma: +155/-376
Re: Hikvision camera as motion sensor
« Reply #9 on: March 11, 2016, 12:12:13 pm »
Is Vera capable of keeping the HTTP connection running and listening for an alarm response? Or would this be too taxing on it's limited resources? Or does it not like background code running?

You need someone alot more experienced then me to get a better answer but almost anything is to taxing on Vera. Running a constant http conenction watching for the alarm trip is much different then the camera just pushing the trip to vera when it needs it.

Offline WhyMe

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Hikvision camera as motion sensor
« Reply #10 on: March 11, 2016, 10:46:18 pm »
I do hope someone will reply. I don't think the load on Vera will be much as the HTTP channel is just held open until there is an event, then XML is returned. In theory, it should consume fewer resources than constant polling, but I don't know enough about Vera to say that with any confidence.

Offline Freddan101

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +12/-2
Re: Hikvision camera as motion sensor
« Reply #11 on: March 12, 2016, 01:31:44 am »
I'm about to expand my system with network cameras and Hikvision seems to be a very good choice.

I'm also interested in if one could manage without Blue Iris to detect motion on Vera. Blue Iris seems competent but as I'm trying to cut down on the electricity consumption I would rather not have a PC running 24/7.

On a side note. Is it possible to save video directly to a cloud service or are you bound to have a local solution?

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5621
  • Karma: +155/-376
Re: Hikvision camera as motion sensor
« Reply #12 on: March 12, 2016, 01:46:13 am »
Problem I have with cloud services is my net upload speed.
If you use cloud how much storage do you plan on?

Using local storage I use around 2TB to keep a week worth of recordings, i also use a SSD drive to write to as most standard HD cant write fast enough for several 3MP cameras streaming at once let alon can my  charter upload speed even upload fast enough.

I cut cut the quality way down and make it fit but then you might as well not research or buy good quality cameras to begin with.

One house i have 10 hikvsions and another i have 7 mixed with 2 old foscams.

Offline Freddan101

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +12/-2
Re: Hikvision camera as motion sensor
« Reply #13 on: March 12, 2016, 02:22:05 am »
I have a fiber connection 100/100 to my house so the bandwith shouldn't be an issue. I could limit myself to only record when away and on motion detected. That should cut down the space needed.

But you make a valid point regarding the image quality. You probably would have to cut it if the recordings can't be cached in the camera before shipping it off to the cloud.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5621
  • Karma: +155/-376
Re: Hikvision camera as motion sensor
« Reply #14 on: March 12, 2016, 05:16:06 am »
I have a fiber connection 100/100 to my house so the bandwith shouldn't be an issue. I could limit myself to only record when away and on motion detected. That should cut down the space needed.

But you make a valid point regarding the image quality. You probably would have to cut it if the recordings can't be cached in the camera before shipping it off to the cloud.

Well with 100 up you wont have any problems like i have. Charter here is 60 down and only 5 up. I only record when away and on motion also, but i have car traffic being recorded at one house. And doing home/away in only hikvision software (no blueiris) mighy be a problem.