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
46 stars 12 forks source link

Missed Events #35

Closed Radcommuk closed 2 years ago

Radcommuk commented 2 years ago

Hello,

Happy New Year to you.

First time posting to Github so apologies if I get anything wrong.

I have just installed HikVision Ultimate but I am having some issues. Many events are missed which I believe is down to a connection issue. I have it connected to a DS-9664-i16 NVR. I have a test camera on the desk. For testing I am using a linecrossing event. It starts to function and detect events but then stops. After a while it then displays "temporary lost connection" after it re-connects it may work but again fail within a minute. Repeating the tests direct to a camera and everything tests fine. The NVR is running the very latest firmware: Firmware Version V4.60.000 build 211129 The NVR can be viewed fine on the same PC and pings to the NVR do not drop. I have tried with the NVR set to digest and digest / basic but again it does not change. I have changed the server to emit errors after 4 but again no change.

To re-produce simply place an alarm node and debug. The debug stops after a short while and the connection error is displayed.

Test PC and NVR on same network just through a single switch. Expect no connection errors. nodered normal 1 nodered error 1

Using version 1.0.58

Node-Red running on Windows 10 PC

Happy to perform any testing to help.

Thank you

Ian

Supergiovane commented 2 years ago

Hi Ian Do you have enabled the API access as described in the Readme file on gitHub? I don’t own such NVR so i cannot test it, but basically the nvr should send an heartbeat packet every xx seconds to signal that it’s alive. Are you able to allow me to connect to your nvr via internet for debugging?

Radcommuk commented 2 years ago

Hello,

Thank you for the prompt reply. If you are refering to the "Notify Surviellance" in the linking tab of the alarm, then yes I have this enabled for all the alarm tests I have been performing. I can use Wireshark and have a look at the packets to see if the heartbeat is being missed etc. I can make the NVR available to the internet if needed. If you can let me know which ports you require access too and if they require TCP or UDP I can program the router to forward accordingly, I have a fixed IP address at this end. I'll capture some packets and see what I can see and message again if I find anything useful.

Thank you

Kind regards

Ian

Radcommuk commented 2 years ago

Hello,

Just a small update. The setup is laptop on same network as NVR with node-red running and wireshark to view packets. Wireshark set to filter only packets to or from the NVR. NVR has ISAPI active with a username and password set. I have been monitoring packets for a couple of hours and the results are as follows: Looking in the NVR log I am getting these messages logged from the laptop IP address: hik log 1

In node-red I simply have a RAW alarm node with a debug connected to the error output to log connection errors. This is the debug log: node-red disconnects

The NVR is very active, monitoring in wireshark shows a steady constant flow of packets between the NVR and the laptop. Suddenly the flow of packets stops in both directions. Approximatley 30 seconds after the flow stops I see the lost connection error show up in Node-Red. After a few seconds the connection is restored and immediatley packets again start to flow in Wireshark. After a short while the process repeats. This would explain the missed events I see.

I hope this helps a little.

Kind regards

Ian

Supergiovane commented 2 years ago

Hi Please tell me your nvr public ip and public port, username and password. I’ll connect as soon as possible to debug the matter. Please forward both tcp and udp.

Radcommuk commented 2 years ago

Hello,

Is there a way I can contact you privately with this information as this is a live system.

Thank you

Kind regards

Ian

Supergiovane commented 2 years ago

ma*****e@icloud.com Here is Holiday now and i’m out with my family. I cannot work on that!

Radcommuk commented 2 years ago

Hello,

Family always come first, Enjoy your Holiday and when you need anything from me just message.

Kind regards

Ian

Supergiovane commented 2 years ago

Hi i've an idea... try to put a Radar Node into your flow and check if it stay connected. Radar node uses the stream event specific for security panels instead of NVRs

Radcommuk commented 2 years ago

Hello, I have added a RADAR node and set it for the NVR ip address. Unfortunately it has not made any difference. Looking at Wireshark I can see adding the RADAR has now added this: PUT /ISAPI/Security/sessionHeartbeat HTTP/1.1\r\n The time between connecting and disconnecting seems to vary vastly. The maximum I have seen is just over 2 minutes and the minimum is 4 seconds.

Thank you

Kind regards

Ian

Supergiovane commented 2 years ago

Hi Ian Please send me via email all things, as i must temporary disable the public access to the repository, due to too many requests i’m working on, on all other my repos. Thanks. maxsupergiovane@icloud.com