2 Issues with my Hikvision DS-2CD2142FWD-IS

Joined
Oct 1, 2016
Messages
7
Reaction score
0
Hi guys! :)

I have a couple of Hikvision DS-2CD2142FWD-IS, (FW: V5.3.8). I bought them from China Security Wholesale on AliExpress. They claim that they are "English version" whatever that means :rolleyes:. The cameras do have English language installed and I have no major issues with them. I've been using them for some time now.

Currently I have two problems to solve. I hope someone here can point me into the right direction.

1) I currently use Basic Event Motion Detection to trigger recordings. I've set up a recording schedule of the type "Motion" which works well. However Basic Event Motion Detection isn't very accurate in determining movements. I've now set up Smart Events for Intrusion Detection and for Line Crossing Detection. They seem to be more reliable. The linkage method used is Trigger Channel: A1. In Storage->Schedule settings I can choose between Motion, Alarm, Motion | Alarm, Motion & Alarm and Event. I think I have tried them all but no matter what I choose I can't make my smart events triggering a recording. Someone got this working?

2) I use my Home Automation System to enable/disable Motion detection. I do that because when I'm at home I don't wish video recording to occur. When I leave my home, my Home Automation System will enable recording by calling an URL on the Hikvision Camera. It works but the motion detection area will be set to full (every square marked). My script contains coordinates that limits the detection area. Below is my shell script.
Code:
#!/bin/bash
# Enable living room WebCam Motion Detection
# To find out what the XML shall look like, check the following URL:
# http://username:password@rpihostnameorip/MotionDetection/1

curl -k -s -H "Content-Type: application/json" -X PUT -d '<?xml version="1.0" encoding="UTF-8"?>
<MotionDetection version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<id>1</id>
<enabled>true</enabled>
<regionType>grid</regionType>
<Grid>
<rowGranularity>18</rowGranularity>
<columnGranularity>22</columnGranularity>
</Grid>
<MotionDetectionRegionList>
<sensitivityLevel>3</sensitivityLevel>
<MotionDetectionRegion version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<id>1</id>
<enabled>true</enabled>
<maskEnabled>false</maskEnabled>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>18</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>22</positionX>
<positionY>18</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>22</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
</MotionDetectionRegionList>
</MotionDetection>' http://username:password@livingroom-webcam.video.HOSTNAME.COM/MotionDetection/1
Any help is surely appreciated. Thanks!

EDIT: I see now that the positions in the RegionCoordinatesList node doesn't seem to be correct. I got them after editing the motion detection area and issuing the following URL: http://livingroom-webcam.video.MYHOSTNAME/MotionDetection/1 ... Strange ...
 
Last edited by a moderator:
Joined
Oct 1, 2016
Messages
7
Reaction score
0
Problem #2 is solved. After some experimenting to redefine the area settings using "normal" configuration I gave up.

It was solved by always letting motion detecting be enabled, deleting the "normal" area and defining an expert setting for the watched area. It just works better to redefine them using my scripts. Below is the curl command for turning motion detection on.

Code:
curl -k -s -H "Content-Type: application/json" -X PUT -d '<?xml version="1.0" encoding="UTF-8"?>
<MotionDetectionRegionList version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>1</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>3</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>154</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>900</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>900</positionX>
<positionY>727</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>154</positionX>
<positionY>727</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>2</id>
<enabled>true</enabled>
<sensitivityLevel>1</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>3</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>4</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>5</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>6</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>7</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
<MotionDetectionRegion version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<id>8</id>
<enabled>true</enabled>
<sensitivityLevel>50</sensitivityLevel>
<objectSize>0</objectSize>
<daySensitivityLevel>50</daySensitivityLevel>
<nightSensitivityLevel>50</nightSensitivityLevel>
<dayObjectSize>0</dayObjectSize>
<nightObjectSize>0</nightObjectSize>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</MotionDetectionRegion>
</MotionDetectionRegionList>' http://username:password@livingroom-webcam.video.mydomain.com/ISAPI/System/Video/inputs/channels/1/motionDetectionExt/regions
For turning it of I just alter the RegionCoordinatesList node for <id>1</id>

Code:
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>0</positionX>
<positionY>0</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
It works. But I still haven't solved my problem #1 in case You know how to help me. Thanks!
 

PerthMan

n3wb
Joined
Nov 15, 2016
Messages
29
Reaction score
3
Hi richard_roe,

Oldish post I know but I might be able to help with a question I had answered (search my posts for intrusion detection).
In my case, I had not selected the correct "linkage method" on the NVR.
To solve I went to the NVR via the web access -> Configuration -> Event -> Smart Event ->Intrusion Detection -> Selected the right trigger channel for that camera.
Then do the same for Line Crossing.

I hope that helps.
Maybe you could help me as well?
I found your post because I am trying to find a way to make some kind of script to Select "Expert" mode in the motion detection. There is a hikvision bug that causes my NVR to push my cameras back to "Normal" mode when I have come back from a power failure. I work away and I just want something my wife can run to flick the cameras back to Expert mode after a power outage.

Going by your post, it appears I can't just make a simple script changing one flag? I would have to use curl to grab the xml when I have the camera set how I want (which should have the Expert areas defined) then after returning from a power outage push this onto the camera?

It seams a little odd because after a power outage all my areas are still defined on the camera, it is just that one little drop down box that has been switched from expert back to normal.

Regards,
PerthMan
 
Joined
Oct 1, 2016
Messages
7
Reaction score
0
Hi PerthMan and thanks for your suggestion. I will check that up.

Going by your post, it appears I can't just make a simple script changing one flag? I would have to use curl to grab the xml when I have the camera set how I want (which should have the Expert areas defined) then after returning from a power outage push this onto the camera?
Something like that sounds like it should work yes...
 

Ukie

n3wb
Joined
Nov 26, 2016
Messages
1
Reaction score
0
Did anyone find a way to work around the bug to which @PerthMan is referring to? I have the same issues. Whenever Motion Detection is toggled, the detection mode switches back to "Normal".
 

PerthMan

n3wb
Joined
Nov 15, 2016
Messages
29
Reaction score
3
Hi Ukie,
Sorry for the late reply. I cut/pasted/modified a little batch scrip to adjust all my cameras after a power outage.
I had my router die however, so have plugged my cameras back into the PoE ports on the NVR and just last night had a power outage again.

This time I have tried to enable virtual host in the router and want to open that batch file to see if I can get it to work with the virtual hosting on the NVR but I cant find it on my lap top.

I know my wife has it. I made it for her so she could just double click and reset all the cameras after a black out. When I get my hands on it I can send it your way or post it here or something.

I have not seen a proper work around though and that was the best I could come up with.
 
Top