Supergiovane / node-red-contrib-hikvision-ultimate

A native set of node for Hikvision Cameras, Doorbells, Alarms, Radars etc.
https://www.facebook.com/supergiovaneDev
MIT License
51 stars 11 forks source link

First set up #64

Closed Findus76 closed 9 months ago

Findus76 commented 9 months ago

Hello

IP camera and live streaming is a completely new field for me. My wish is to get in node red to be able to take a still image from the camera and also integrate the live stream in the Node red UI. Also want node red to be triggered on events from the camera. Today I only have one camera "DS-2CD1163G2-LIUF". To use your library does the camera need to be connected to an NVR? If it works without NVR. Found settings in the camera for the event server, should I specify the computer where node red is running on?

Brg

Supergiovane commented 9 months ago

Hello Findus i suggest you not to do any streaming from node-red. It’s not designed to do that. You can use Frigate, Home Assistant or whatever you want.

No, you don’t need to specify any destination IP.

Findus76 commented 9 months ago

Hello

Thanks for your reply.

If I don't need to set up the IP and port in the camera for the event server. How does the camera signal events to node red then?

Brg Findus

Supergiovane commented 9 months ago

Hi, In the camera settings or in the "event links" (depends on your camera and firmware), be sure to click "Notify alarm center", like this:

https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate/assets/37666636/46ce7d95-5750-4499-8ad4-441658e47dd1

Findus76 commented 9 months ago

Hi

Completely new world for me with cameras, streaming and NVR.

Attaching screenshots of settings in the camera, finds "Notify Surveillance Center" and something similar to your video. But shouldn't one enter an IP address under Alarm Server? Or does your library open link to the camera, or is the camera polled?

I have not yet installed your library, nor mounted the camera where it should be yet. I'm just trying to understand what I need to do. Screenshot_1 Screenshot_2 Screenshot_3 Screenshot_4

Supergiovane commented 9 months ago

Yes, it's ok this.

My hikvision node is meant to provide a stream of EVENTS coming from the camera. Events are strings containing text like "motion/video tampering... etc.." If you intend to stream the video, you need to use other software, because with my node you can only get still images in BASE64 format, to be used in emails, etc...

Findus76 commented 9 months ago

Going from clarity to clarity.

Primarily, the idea is to get a still image to attach to an email. Getting streamed real-time image is a bonus.

Ok, understand the strings. Still unclear if the camera is polled, as no server address needs to be entered in the camera. Can you trigger via your library to take a picture without an event having triggered the camera? Such a trigger takes time? Except for the time it takes to send command to the camera. For example, if the computer has to connect to the camera, log in every time a manual trigger is activated.

Brg

Supergiovane commented 9 months ago

The node connects to the camera. The camera has an event stream, where it writes all the events. It's the hikvision node itself that connects to the camera and do all the work. You don't have to set anything into the camera, apart form the "notify surveillance center". This option tells the camera to add to the event stream, the event you selected.

You should send a command to the node to take a "picture". The node waits in async mode, for the camera to send the picture. Once received, the node send the picture as BASE64 to the output pin. This is all in real time. It can take some seconds, depending on the speed of your CPU (the node must handle the received picture and transform it). Anyway, you can read the documentation on the main page of the node, on gitHub.

Findus76 commented 9 months ago

Many thanks!

Then I think I understand how it works, and it feels completely right to me. Going to proceed with installing your library (need to update my node red installation first though). It is perfectly ok if the picture takes a couple of seconds, if the wait is within the capacity of the computer. Want to be able to trigger a recording of some event, an IR sensor or similar. Then there needs to be as little latency as possible between the command and when the picture is taken. Admire your great work you do to spread knowledge, all credit!