So I have a NV4216E-AI and I am trying to enable face detection for my cameras, 3 IP2M-843EB, 1 IP2M-852EB, 1 AD110.. no other IVS/Heat Map things are enabled... I can enable Face Detection on the first two 843s, when trying to enable on the other 3, one each of 843, 852, and ad110 it says:
"The function can be enable after encode enhancement is disabled"
I have reset the the cameras to the default encoding and I cannot figure out what setting may be preventing me from enabling it.
Face Detection on AI-NVR
Re: Face Detection on AI-NVR
The only encode enhancement that I am aware of is the "Smart Codec" option in the camera Encode section. Is that unchecked? This is also referred to as H.264+ or H.265+.
The default is probably H.264H for your cameras but that's probably not considered an encode enhancement, but a compression enhancement over H.264. (The AD110 defaults to H.264B (basic compression) with no smart codec option, according to my NVR menu).
I don't think you will be able to do face detection on the AD110 via the NVR - at least, not with the model I have. That would sure be nice. When I try to enable a smart plan for face detection, the channel for the AD110 does not even appear, which means it isn't supported. So your AI NVR allows you to enable a face detection smart plan for the AD110? If so, there really isn't an encode enhancement option you can turn off that I know of.
This link will give you a little more background info...
https://dahuawiki.com/IVS
The default is probably H.264H for your cameras but that's probably not considered an encode enhancement, but a compression enhancement over H.264. (The AD110 defaults to H.264B (basic compression) with no smart codec option, according to my NVR menu).
I don't think you will be able to do face detection on the AD110 via the NVR - at least, not with the model I have. That would sure be nice. When I try to enable a smart plan for face detection, the channel for the AD110 does not even appear, which means it isn't supported. So your AI NVR allows you to enable a face detection smart plan for the AD110? If so, there really isn't an encode enhancement option you can turn off that I know of.
This link will give you a little more background info...
https://dahuawiki.com/IVS
Re: Face Detection on AI-NVR
So I tried setting it directly on the nvr instead of through web, apparently you can only have face detection turned on two devices at a time? The message was different there.. disappointing to say the least..
also I am having trouble getting my motion events out using a python script.. seems something is different with the auth on this one...
I’m trying to see if i can decipher what’s different with the auth on that compared to like python Amcrest because that still seems to work but only on the first channel of course.. I was excited to get a new toy.. not so much anymore :’(
also I am having trouble getting my motion events out using a python script.. seems something is different with the auth on this one...

Re: Face Detection on AI-NVR
Good move using the NVR menu directly to get a better read on the issue. I did not know about that 2 camera face detection limit. Maybe that depends on the NVR model (processing power) and is not a hard limit across the board.
Are you referring to AD110 motion events and scripts found in the python-amcrest AD110 discussion? The digest authentication works for the AD110 same as any other Amcrest or Dahua camera. The python-amcrest http.py code (which Home Assistant uses) first tries Basic Auth, then tries Digest. I have a long-standing HASS Amcrest enhancement request to support NVR channel selection, but for now, I just connect to each camera via IP directly.
Are you referring to AD110 motion events and scripts found in the python-amcrest AD110 discussion? The digest authentication works for the AD110 same as any other Amcrest or Dahua camera. The python-amcrest http.py code (which Home Assistant uses) first tries Basic Auth, then tries Digest. I have a long-standing HASS Amcrest enhancement request to support NVR channel selection, but for now, I just connect to each camera via IP directly.
Re: Face Detection on AI-NVR
The AD110 is working with the regular HA Amcrest Component to get the motion, it's the cameras that are connected to the NVR that become the issue. The standard components simply show the first channel, so I used this https://github.com/psyciknz/CameraEvents for the last couple years to get motion from all the cameras, so seeing as this API is similar I thought it would work but it seems to be having auth issues, it says "Invalid Authority!' when trying to connect to the event stream... but It works fine in the browser so I don't really understand... it uses /cgi-bin/eventManager.cgi?action=attach&codes=[VideoMotion] I don't even know where to start debugging to see what the issue is... I did come across a zoneminder related GitHub where they mentioned having to send commands twice for PTZ controls due to a change in the api, so I don't know if simply trying to auth a second time would fix it.... really not a programmer, just a dabbler... and have taught myself a tiny bit
Re: Face Detection on AI-NVR
I see far too many motion events using the HA Amcrest integration than are actually recorded by the AD110 internally. I find it unusable. At the moment, I am using Tasker/Smarthome to trigger both button press and motion sensors in HA and it works really well. I am also collaborating with python-Amcrest to get these 2 events properly integrated so I hope to retire this Tasker workaround.
I've not used the CameraEvents script you referenced, but I took a quick look at the code and it is indeed using Digest Auth...
response = requests.get(self.channelurl,auth=requests.auth.HTTPDigestAuth(self.user,self.password))
That would be the most likely call that would return an "Invalid Authority" error, but I can't explain why. I suggest that you submit an issue to his github repo and provide as much detail as you can for some help.
I've not used the CameraEvents script you referenced, but I took a quick look at the code and it is indeed using Digest Auth...
response = requests.get(self.channelurl,auth=requests.auth.HTTPDigestAuth(self.user,self.password))
That would be the most likely call that would return an "Invalid Authority" error, but I can't explain why. I suggest that you submit an issue to his github repo and provide as much detail as you can for some help.
Re: Face Detection on AI-NVR
I totally forgot about the Tasker thing I read about that when I got my first NVR... is there anywhere that tells you how to set that up with HA? Thanks for all your help
Re: Face Detection on AI-NVR
I did a write up on how to set up Tasker with SmartHome and Home Assistant here...
https://community.home-assistant.io/t/a ... u=garyokie
You might also want to check out a script @pcabral developed that listens for both Button presses and Motion events directly from the doorbell (not SmartHome). It can run on any Linux distribution and I think that includes a DDWRT or equivalent router. He set up the triggers to connect to Synology Surveillance Station, but those triggers could be changed to connect to Home Assistant via its REST API. I started to set that up but got sidetracked.
https://amcrest.com/forum/amcrest-smart ... tml#p32585
https://community.home-assistant.io/t/a ... u=garyokie
You might also want to check out a script @pcabral developed that listens for both Button presses and Motion events directly from the doorbell (not SmartHome). It can run on any Linux distribution and I think that includes a DDWRT or equivalent router. He set up the triggers to connect to Synology Surveillance Station, but those triggers could be changed to connect to Home Assistant via its REST API. I started to set that up but got sidetracked.
https://amcrest.com/forum/amcrest-smart ... tml#p32585
Re: Face Detection on AI-NVR
Working now.. long, embarrassing explanation on the camera events GitHub... thanks for all your help..
and the Nvr did grab a couple face detections off the AD110.. although I expected more, but could be the need to figure out more of the settings.
and the Nvr did grab a couple face detections off the AD110.. although I expected more, but could be the need to figure out more of the settings.
Re: Face Detection on AI-NVR
Thanks for the update! That's quite interesting you were able to get a few face detections from the doorbell cam. That's a great feature your model of AI NVR has. Best of luck with the tweaking to improve it.
Just an FYI, if you were to query the AD110 native "Event" capabilities via:
<ip_addr>/cgi-bin/eventManager.cgi?action=getExposureEvents
you would get back:
events[0]=LoginFailure
events[1]=VideoMotion
events[2]=VideoBlind
events[3]=AlarmLocal
events[4]=StorageNotExist
events[5]=StorageFailure
events[6]=StorageLowSpace
But if you were to query a camera capable of local face detection, you would see in addition:
events[7]=FaceDetection
That explains why my NVR which doesn't have AI Face Detection logic built-in did not show any way to enable it for the AD110. The non-AI NVR must rely on cameras that have that feature to provide it.
Just an FYI, if you were to query the AD110 native "Event" capabilities via:
<ip_addr>/cgi-bin/eventManager.cgi?action=getExposureEvents
you would get back:
events[0]=LoginFailure
events[1]=VideoMotion
events[2]=VideoBlind
events[3]=AlarmLocal
events[4]=StorageNotExist
events[5]=StorageFailure
events[6]=StorageLowSpace
But if you were to query a camera capable of local face detection, you would see in addition:
events[7]=FaceDetection
That explains why my NVR which doesn't have AI Face Detection logic built-in did not show any way to enable it for the AD110. The non-AI NVR must rely on cameras that have that feature to provide it.