No you can’t. The NVR does not have the alarm server/http listening feature. If cameras are connected directly to the NVR PoE ports you would have to put them on their own PoE switch connected to the LAN and reconfigure the connection for recording.
I have set this up and I'm assuming it is working correct as I am seeing motion: active / inactive events triggering via VMD in the logs and also in 'current states'
Looking at the docs, should I expect a 'line crossing detection' event to show as'pushed:1' in the current states of the device, then if there is 'intrusion detection' event I should expect the current states show as 'pushed: 7' (with regards buttons)?
I don't see any changes to any button presses unless I have missed a step in the setup, All smart events are enabled and Notify Surveillance Center is ticked. Using HikConnect I can see smart events triggering in the app (I know this is from the NVR - but is a good indicator of the event happening)
Okay... so I had set this up first on one of my cameras (DS-2CD2346G2-IU) and nothing was coming through so i tried it on another (DS-2CD2325FWD-I) and it works like a charm, buttons showing pressed for different smart events. It must be a problem with the type of camera although in both the GUI's are the same except the first model has an option for 4x line crossing events.
Are you using it with your cameras behind an NVR?
No, they're directly connected to my network so not behind my NVR
My apologies, I got my Chinese manufacturers mixed up.
Do a Google search for virtual host with your NVR model so see if your NVR had this option. Maybe you are the unlucky one or need a firmware update. With Virtual host, you can access the camera directly through the NVR.
Virtual host is just a means to access the cameras web menu via the IP address of the NVR that it’s connected to http://NVR_IP_Address:650xx where xx is the channel number 01-16. But it’s irrelevant….
The camera not the NVR has the alarm server/http listening feature. You can access that setting and program it on the camera, but if the camera is connected to the PoE port of the NVR, the alarm will not get though to the hub. As stated above, the workaround is to put the camera on the LAN, not the NVR and reconfigure the NVR channel to record it at its LAN address.
Use the alarm on the camera. Pretty sure it has ONVIF
Yes they do have ONVIF but again it’s not relevant to the way the Hikvision alarm server/http listening feature on the camera works. When I say that the feature (Hikvision device driver) doesn’t work for cameras connected to a Hikvision NVR; I’m referring to cameras that are physically plugged into the NVR PoE ports (rather than linked on the LAN). Those PoE ports have to use a different subnet (192.168.254.xxx by default) to the LAN connection of the same NVR. The NVR will not pass any message from the camera onto the LAN.
You can get around this if your NVR allows manually adding LAN cameras. Then they're on the NVR and your LAN so HE Driver can be used. A couple things though:
-
Your cameras need to be on FW ver 5.5.xxx? or higher. Anything newer then a few years already has this. Some older cameras will never have the latest FW available. I have some stuck on FW 5.3.xx so cant use the Driver.
-
Using cameras that were bundled with the NVR might need to have the camera FW upgraded to be a stand alone POE cam. It is possible to flash on Hikvision FW onto a rebranded Hik cam. Some caution needs to be followed though.
Do you know what the APIs are on the cameras used to query alarm status? I can experiment to see if I can find equivalents on my NVR. I'd be very surprised if there wasn't some way to pull the events off of the NVRs directly.
Yes I have a copy of the API documentation. Combined with node-red I can create actions from camera alarm events etc. I’m using that already in my setup. However that doesn’t alter the way that this Hikvision driver works which solely uses the camera http listening/alarm server feature:
-
Cameras on the LAN manually configured, standalone or recorded by NVR - the Hikvision camera driver will work
-
Cameras plugged into the NVR PoE ports - the Hikvision camera driver will not work
As both @kampto and myself have mentioned. It’s relatively easy, with the addition of a cheap PoE switch at the NVR to reconfigure the camera so that it’s connected to the NVR via the LAN. Steps would be as follows:
1 - In the NVR Camera config page make a note of the IP address which will be 192.168.254.xxx before unplugging it.
2 - Connect the camera(s) to the PoE switch. Using the IP address above login to the camera web config. In Configuration > Network, change the IP address to suit. I’ll usually set the address to the channel number plus 100 making it easier to remember (eg on my network cam 3 would be 192.168.0.103) Repeat for each camera.
3 - For each camera moved to the switch; in the NVR Camera configuration page, select the channel and click edit. Change ‘adding type’ from plug and play to manual, amend the IP address to match what was set in step 2, enter the admin password and click save.
4 - Disconnect the network connection from the NVR, connect it to the PoE switch and patch from the switch back to the network NVR network port.
And that’s it done. It’s important to carry out the steps in that order. If you were to manually configure a camera with its new address and plug it back into the NVR directly to a port set as plug and play, it’ll just wipe what you’ve done if the admin password is the same.
I'd be interested to know if anyone has tried this with Annke cameras? They are basically rebranded Hikvision, just OEM versions...
I am trying this driver for the first time. The camera and HE are talking. But I am getting the following error. Any advise?
dev:7052024-02-18 06:15:29.907 PMerrororg.xml.sax.SAXParseException: Content is not allowed in prolog. on line 58 (method parse)
dev:7052024-02-18 06:15:29.889 PMdebugmsg:[mac:XXXXXXXXXXX, ip:c0a80165, port:f92e, headers:[POST / HTTP/1.1:null, Connection:close, Host:192.168.1.56:39501, Content-Length:723, Content-Type:multipart/form-data; boundary=boundary], body:--boundary Content-Disposition: form-data; name="MoveDetection.xml"; filename="MoveDetection.xml" Content-Type: application/xml Content-Length: 553 192.168.1.101 39501 HTTP 08:54:11:95:02:7f 1 2024-02-18T18:15:27-05:00 1 VMD active Motion alarm Front Porch --boundary-- , header:POST / HTTP/1.1 Connection: close Host: 192.168.1.56:39501 Content-Length: 723 Content-Type: multipart/form-data; boundary=boundary ]