Dahua Starlight Varifocal Bullet Z12 5.3-64mm (IPC-HFW5231E-Z12)

EvgenioZ

Young grasshopper
Joined
Oct 31, 2016
Messages
48
Reaction score
0
Location
Ukraine, Zaporozhye
Can anyone publish some demo-video of this cam at the daytime and different focusing distances?

Thanks.
 

Dseg42

Getting the hang of it
Joined
Apr 17, 2016
Messages
169
Reaction score
14
Location
Palm City, FL
Did you make sure to switch Profile Management to Schedule in the Dahua software? This may be why your camera is not changing Profiles on the set times.

I haven't figured out a way to make the camera stop focusing automatically. The problem occurs the most in the evening, but can also happen during the day depending on if there are both near and far objects in the frame.

What I have done is use Domoticz to send commands periodically to manually Focus the camera to my desired settings. I send a Focus command 15 seconds after I send the Day profile command. I also have the Domoticz Timer switch automatically send a manual focus command every few hours after Sunrise.

Likewise, I send a Focus command 15 seconds after having Domoticz send the Night profile API command. At night, I send a Focus command every hour because the camera likes to autofocus on the nearer trees.

In Domoticz, I added Hardware/Devices set as Dummy type. I then use the Switches section to add the HTTP codes. Then I use the Timer function on the Switch to issue Day profile command at Sunrise and Night Profile command at Sunset. I added a separate device for each command and switch.

There are probably easier ways to accomplish what you need, but this seemed to do the trick for me until there's a way to lock Focus in the Dahua firmware. I also found that Focus settings during the Day were not great at Night, so I have a separate HTTP command for Day and Night Focus.

Get Focus Status:
http://username:password@<ip>/cgi-bin/devVideoInput.cgi?action= getFocusStatus

Adjust Focus:
http://username:password@<ip>/cgi-bin/devVideoInput.cgi?action= adjustFocus&focus=<focus>&zoom=<zoom>

Day and Night Profile HTTP API:

Day: Z12 - 0 Switches to Day Profile
http://username:password@<IP>/cgi-bin/configManager.cgi?action=setConfig&VideoInMode%5B0%5D.Config%5B0%5D=0

Night: Z12 - 1 Switches to Night Profile
http://username:password@<IP>/cgi-bin/configManager.cgi?action=setConfig&VideoInMode%5B0%5D.Config%5B0%5D=1

If using above Day/Night commands, set Profile Management in Dahua Firmware to Full Time.
Thanks - I spent a lot working on this but still no luck.
I would definitely not recommend this camera with the auto-focus issue.
I don't understand why we can't just set the focus and it not change on it's own.

My camera is constantly out of focus.
 

Dseg42

Getting the hang of it
Joined
Apr 17, 2016
Messages
169
Reaction score
14
Location
Palm City, FL
Thanks - I spent a lot working on this but still no luck.
I would definitely not recommend this camera with the auto-focus issue.
I don't understand why we can't just set the focus and it not change on it's own.

My camera is constantly out of focus.
Man, the police came over today to see if I had footage of a car leaving the community.
My LPR (IPC-HFW5231E-Z12) was so out of focus, it was useless. What a crap camera...
 

Go3Team

Pulling my weight
Joined
Mar 13, 2017
Messages
147
Reaction score
110
Location
RVA
Man, the police came over today to see if I had footage of a car leaving the community.
My LPR (IPC-HFW5231E-Z12) was so out of focus, it was useless. What a crap camera...
I have to set the focus manually. With the settings it has for LPR, there's not enough light for it to focus itself at night.
 

EMPIRETECANDY

IPCT Vendor
Joined
Nov 8, 2016
Messages
8,259
Reaction score
23,717
Location
HONGKONG
What are you using to set the focus manually?
Is this camera loose focus in the daytime or not? This camera is not default as a LPR camera, all tested and researched by other members here and find this cost saving way for LPR. So maybe you have some setting wrong? What is your fw No? Maybe i can send you a new FW for updating?

Maybe you can refer to this posting.
Dahua IP-HFW5231E-Z5 LPR settings
 

Go3Team

Pulling my weight
Joined
Mar 13, 2017
Messages
147
Reaction score
110
Location
RVA
What are you using to set the focus manually?
I use a home automation software called OpenHAB. It calculates what time of day the sun rises and sets, and then sets the camera profile. I have different profiles for the time of day to get the best setting for the camera to get the best reading.
 

Bernie199

n3wb
Joined
Sep 19, 2017
Messages
20
Reaction score
1
I have the IPC-HFW5231E-Z12 and found the Dahua IP-HFW5231E-Z5 LPR settings no use to me as it overexposes the night images, too much flare from lights and faded licence plates, tonight I set the shutter speed to 1/2000 and aperture to 34 and IR on manual 100% I'm capturing from 90 feet away these settings will vary for everyone distance being 1 factor to consider, I'm trying for a fast shutter speed and a good IR to light the licence plates up then using the aperture to fine tune other light sources out, tonight a car happened to pull up in my target area which was ideal when tuning my aperture.

The autofocus is an issue I wish there was an option to set a fixed focus maybe someone will do a custom firmware at some point otherwise it would be an ideal camera, I have set the night mode to come on early in the afternoon and switch off late on the morning this seems to help but sometimes find the camera has tried to focus in the dark.

The Image at the bottom with the washed out plate below is on the Z5 settings.
 

Attachments

Last edited:

Go3Team

Pulling my weight
Joined
Mar 13, 2017
Messages
147
Reaction score
110
Location
RVA
I have the IPC-HFW5231E-Z12 and found the Dahua IP-HFW5231E-Z5 LPR settings no use to me as it overexposes the night images, too much flare from lights and faded licence plates, tonight I set the shutter speed to 1/2000 and aperture to 34 and IR on manual 100% I'm capturing from 90 feet away these settings will vary for everyone distance being 1 factor to consider, I'm trying for a fast shutter speed and a good IR to light the licence plates up then using the aperture to fine tune other light sources out, tonight a car happened to pull up in my target area which was ideal when tuning my aperture.

The autofocus is an issue I wish there was an option to set a fixed focus maybe someone will do a custom firmware at some point otherwise it would be an ideal camera, I have set the night mode to come on early in the afternoon and switch off late on the morning this seems to help but sometimes find the camera has tried to focus in the dark.

The Image at the bottom with the washed out plate below is on the Z5 settings.
You can set the focus manually.

Get current focus state:

http://name:pass@10.0.0.XX/cgi-bin/devVideoInput.cgi?action=getFocusStatus

Code:
status.Focus=0.500000
status.FocusMotorSteps=644
status.Status=Normal
status.Zoom=0.877598
status.ZoomMotorSteps=433
Find out what focus level works for you and you can set the focus:

http://name:pass@10.0.0.XX/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.500000&zoom=0.877598

I have a script that checks the focus every 5 minutes and gets it back in check if needed.
 

Bernie199

n3wb
Joined
Sep 19, 2017
Messages
20
Reaction score
1
You can set the focus manually.

Get current focus state:

http://name:pass@10.0.0.XX/cgi-bin/devVideoInput.cgi?action=getFocusStatus

Code:
status.Focus=0.500000
status.FocusMotorSteps=644
status.Status=Normal
status.Zoom=0.877598
status.ZoomMotorSteps=433
Find out what focus level works for you and you can set the focus:

http://name:pass@10.0.0.XX/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.500000&zoom=0.877598

I have a script that checks the focus every 5 minutes and gets it back in check if needed.
What are you using to run the script?
 

Go3Team

Pulling my weight
Joined
Mar 13, 2017
Messages
147
Reaction score
110
Location
RVA
What are you using to run the script?
I use a computer running this script:

Code:
<?php
$login = 'user';
$password = 'pass';
$url = 'http://10.0.0.XX/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
$result = curl_exec($ch);
curl_close($ch);
$line = strtok($result, "\n");
$dingo = rtrim($line);
$checkdigit = substr($dingo, -1);
if($checkdigit == 1) {
        $url1 = 'http://10.0.0.XX/cgi-bin/devVideoInput.cgi?action=getFocusStatus';
        $ch1 = curl_init();
        curl_setopt($ch1, CURLOPT_URL,$url1);
        curl_setopt($ch1, CURLOPT_RETURNTRANSFER,1);
        curl_setopt($ch1, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
        curl_setopt($ch1, CURLOPT_USERPWD, "$login:$password");
        $result1 = curl_exec($ch1);
        curl_close($ch1);
        $line1 = strtok($result1, "\n");
        $dingo1 = rtrim($line1);
        $pieces = explode("=",$dingo1);
        //echo "$pieces[1]\n";
        if($pieces[1] != "0.165000") {
                //echo "Adjusting focus!\n";
                exec("curl -s -u user:pass --digest -g \"http://10.0.0.XX/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.165&zoom=1\" > /dev/null");
        } else {
                //echo "Focus ok!\n";
        }
}
?>
 

Bernie199

n3wb
Joined
Sep 19, 2017
Messages
20
Reaction score
1
I use a computer running this script:

Code:
<?php
$login = 'user';
$password = 'pass';
$url = 'http://10.0.0.XX/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
$result = curl_exec($ch);
curl_close($ch);
$line = strtok($result, "\n");
$dingo = rtrim($line);
$checkdigit = substr($dingo, -1);
if($checkdigit == 1) {
        $url1 = 'http://10.0.0.XX/cgi-bin/devVideoInput.cgi?action=getFocusStatus';
        $ch1 = curl_init();
        curl_setopt($ch1, CURLOPT_URL,$url1);
        curl_setopt($ch1, CURLOPT_RETURNTRANSFER,1);
        curl_setopt($ch1, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
        curl_setopt($ch1, CURLOPT_USERPWD, "$login:$password");
        $result1 = curl_exec($ch1);
        curl_close($ch1);
        $line1 = strtok($result1, "\n");
        $dingo1 = rtrim($line1);
        $pieces = explode("=",$dingo1);
        //echo "$pieces[1]\n";
        if($pieces[1] != "0.165000") {
                //echo "Adjusting focus!\n";
                exec("curl -s -u user:pass --digest -g \"http://10.0.0.XX/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.165&zoom=1\" > /dev/null");
        } else {
                //echo "Focus ok!\n";
        }
}
?>
so this could be put into a batch file that starts automatically when the computer starts?
 

Bernie199

n3wb
Joined
Sep 19, 2017
Messages
20
Reaction score
1
File C:\Users\Berndt\Documents\test.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: :)) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess

not really clued up with scripts I had a dabble years ago with simple scripts things have changed a bit
 
Last edited:

Go3Team

Pulling my weight
Joined
Mar 13, 2017
Messages
147
Reaction score
110
Location
RVA
The script I posted is run on a computer running Ubuntu Linux. You may be able to do something similar in Powershell.
 

Bernie199

n3wb
Joined
Sep 19, 2017
Messages
20
Reaction score
1
I was thinking of installing Ubuntu because this laptop is being used solely for the ALPR camera and this Win10 is being pretty fickle
 

crc2004

Pulling my weight
Joined
Apr 18, 2016
Messages
213
Reaction score
144
Thanks - I spent a lot working on this but still no luck.
I would definitely not recommend this camera with the auto-focus issue.
I don't understand why we can't just set the focus and it not change on it's own.
My camera is constantly out of focus.
Are you focusing via the camera's web interface and have you disabled PTZ/control for that camera in BI?
 
Top