IPC-HFW5231E-Z12 - What is the focus issue?

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
296
Reaction score
566
Location
North America
I purchased two Dauha IPC-HFW5231E-Z12 to use for LPR.

I have been messing with the settings for a few weeks. I am using two cameras, up and down the street so I can try and capture both front and backplates.

One camera I am using with an external IR light, sometimes I get very nice shots at night like this example which is 200ft from the camera.

je5.jpg

In order to get this shot, my zoom on the camera is zoomed in to 1140 (out of 1200 I believe).

I know there are focus issues with these camera, when it changes from night to day, or day to night it might mess with the focus.

In the day, my zoom/focus numbers are 1140 zoom and 980 focus.

Those settings work at night as well, AS LONG AS THE CAMERA DOES NOT CHANGE THE FOCUS.

Sometimes the camera will change the focus and others it will not. I assumed if the camera changed the focus I would just dial the zoom/focus back to 1140/980 and the camera should be back in focus.

Unfortunately, that does not seem to work. If the camera messes with the focus and I put it back, it is never in focus again. I have to wait until daylight and get new focus values.

Am I having this problem because I am zoomed in too far? I thought I read something about these cameras not being used above 80% focus - is this the reason?
 
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
You do know that you can just set the focus value, right?

I have two of the 5241 z12e cams and the way to keep them in focus at night is to make the change over from color to IR about 30 minutes before it gets dark.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
296
Reaction score
566
Location
North America
I change the cameras over 1 hour before sunset and back to color 1 hour after sunrise. Even still, the camera will still mess things up sometimes (25% of the days).

How do you just set the focus? I have been setting the zoom/focus from the camera interface on the zoom/focus page. Even when set to a known good value, at night it does not work.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
296
Reaction score
566
Location
North America
Yes, that is the slider I am using to set the zoom & focus values. At night, even if I set it to the proper value it will not focus. It just happened again tonight, I will now have to wait until morning and I will be able to set the focus again.

I suspect this problem is because I am zoomed in so far, I suspect I will have to pull the camera back to less zoom and see what happens then.
 
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
I had my LPR-W cam unfocus one night but I just set the focus back to 1600 which is what it was during the day and it was fine. The 'speed' value is also what the rounding value of the slider is. So if your actual slider value is say, 1615 and the speed is set at 20, when you hover over the slider, it will say 1620. To see what the actual value on the slider is, set the speed to 1, then hover over it.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,014
Reaction score
47,469
Location
Floriduh
Also, they seem to lose focus now and then if zoomed more than about 80-85% Not exact, but the closer you get to max zoom, the more this occurs.
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,430
Reaction score
47,552
Location
USA
Also make sure you set the speed over to the right to 1 before you make any adjustments - otherwise when it is set at 20 and you dial up 980, it could be anywhere from 970 to 990.

Also make sure your shutter is not set to a range because it will change the shutter speed and then it will hunt for a focus.
 

cjowers

Getting the hang of it
Joined
Jan 28, 2020
Messages
107
Reaction score
36
Location
AUS
good answers above. if it's not enough you can try a workaround -
setup a script to run regularly (use windows task scheduler for instance) which calls the correct camera API focus/zoom settings. if it has drifted, it will at least go back to where you want. there is also an API call to lock the focus mode to manual (but personally I didn't see much improvement from that). you could run this every minute if you want, but i suspect twice a day (just after the night/day swtich) is enough.

I don't have my call handy, but it should be something like this, run in a web browser....
http://<ip>/cgi-bin/devVideoInput.cgi?action= adjustFocus&focus=<focus>&zoom=<zoom>
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
Here are 3 API commands that I use in a cronjob for my cameras. The script uses curl to interface with the cameras. This script is runs every minute 24/7. It checks the the focus value if it is not what I have designated for the current profile it forces a change. If you don't put in the login : password in the url you will get a popup to login. You only need to do this once every so often. The camera will eventually force you to login again but I'm not sure what the timeout is.

I also found some additional API info in this document:

Code:
This command shows you which mode the camera is in Day, Night or Normal
http://login:password@ca.me.ra.ip/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode
Day = 0, Night = 1, Normal = 2

This command lets you see the current focus and zoom settings:
http://login:password@ca.me.ra.ip/cgi-bin/devVideoInput.cgi?action=getFocusStatus

This command will let you adjust the focus and zoom settings:
http://login:password@ca.me.ra.ip/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.888889&zoom=0.499168[CODE]
 

nbstl68

Getting comfortable
Joined
Dec 15, 2015
Messages
1,399
Reaction score
321
So I have a HFW5231E-Z12 that I bought a while back and just now setting it up, (now that's it already considered outdated. :rolleyes: ) I'll probably try to use it for LPR but right now just playing around, pointing it at a deer feeder in a field. I want to have it fully zoomed but am dealing with it not focusing especially when at or anywhere near full zoom it just bobs around then ends on a blur.
I am not qualified to figure out cron jobs nd curl script to try to force a setting.
Has anyone found a simpler "cure" for this?
It also has the original firmware and I saw a couple of threads about newer firmware out there from last year. Has a firmware upgrade helped this issue for anyone?
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,014
Reaction score
47,469
Location
Floriduh
Try using the “schedule” profile and have it switch to B&W for night 45 min before sunset. It will typically hold focus through the night.
In the morning have it switch back to color 45 min after sunrise.

I have two 5232z-12s I use for LPR I’ve done this with for years and it works fine.

Try to keep it under 90% zoom as between there and max zoom it may not focus. But if it does before dark while it still has something to focus on, it should be fine.

Yes you have to spend a whopping 5 minutes adjusting it 4 times a year or so for time/season shift.
 

nbstl68

Getting comfortable
Joined
Dec 15, 2015
Messages
1,399
Reaction score
321
I played with the settings a bit as suggested and set the schedule for night\B&W IR at 6:30. It worked and focused decently on the spot. Then a big rain storm came through and still here and that's when I realize a zoomed in camera image is apparently completely useless in the rain at night. Going to try again tomorrow. Thanks for the tip. Just wish I could actually use the full zoom of this camera....paid ofr a 12x but after I'd guess about 65-70 zoom (is there any setting that tells you what percent zoom you are at?) it hunts then ends in a blur. I was reading elsewhere sometimes you need a bigger object or someone to stand with a large sign or something at the range you want for it to have something to focus on....but then if it's always going to keep auto-adjusting that won't last.
Is there any way to to set and hold a focal point and turn off auto-focus? There is an auto-focus and an "easy focus" button, (not sure how that was different other than it showed some values on screen I did not understand) but that seems to just trigger it to try...I still had to manually adjust the slider and then it would want to change later.

I found 2 firmware threads...one for the "official" last update (v15...) and another V16...never claimed official.
So, the age old question...do I leave well enough alone or do I do one of these updates and see if it makes any difference in the finickiness of the focus? (My version is 2.460.0000.15.R, Build Date: 2017-09-07)
I've not found where anyone yet mentioned it did anything for focus and now that the newer camera is out I doubt this one will get any further discussion.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,430
Reaction score
47,552
Location
USA
You can zoom in higher than 65% zoom. Many have reported blurry, but you may or may not experience the same thing. I am using my 5231-Z12E at full zoom and the picture is acceptable. YMMV.

If you set the camera to go into B/W early as suggested, it will have something to focus on and will hold that focus the rest of the night, even with a rainstorm. Rain and IR and not good playmates as you are seeing and getting IR bounce all night from the rain.

But the issues you are referring to in your research is more when people are using it for license plate reading, we have to run a fast shutter (1/2000), so it needs enough light to focus before it gets dark because the image is completely black at night except for when a car goes by and all we see are head/tail lights and the plate.

Since you are not running that fast of shutter to watch a deer feeder, you do not have that same issue. So what is happening is at the zoom you are at, the camera is having trouble finding something to focus on, even though the deer feeder is in plain site - something about the reflection and the zoom you are at has trouble with the focus. How far away is it and what is your IR settings on? You many need to go to manual IR and power at 100 near and far.

But what you need to do is from this screen taken from the post above, change the speed to 1 and then manually adjust the focus until it is clear. I have had to do that with the 5231-Z12E and 5241-Z12E when zoomed in tight. I had a fire hydrant and mailbox in the image and thought for sure it would autofocus at night but it would blur like yours did until I set a manual zoom.

1617856989717.png

Then you can use this utility that a member created that will force the camera to a set zoom and focus for day and night based on sunrise/sunset and not have to deal with the schedule and setting and forcing B/W before sunset.

 
Last edited:

nbstl68

Getting comfortable
Joined
Dec 15, 2015
Messages
1,399
Reaction score
321
Thanks, that helped a little and I was able to get it manually dialed in before dark that way, but it appears to still try to auto-focus at some odd time in the middle of the night anyway as it triggers a motion event by the focus changing.
Anyway...new issue. I was going to start a new thread but figured it is still about focus sort of....

So, even though this is a couple years old camera, it was just unboxed and put into the current use a few weeks ago. Over the weekend we had storms and high winds. The image became fogged and when I took a look, it had condensation on the inside of the glass. I'm assuming this really should not happen to an "outdoor" camera, right?
I brought it in and let it sit for a day but no change. I then used a hair dryer on a low heat setting and the condensation slowly went away, however the image is still very foggy.

It is like it's left a permanent film. I assume a faulty seal somewhere but expected it would clear up eventually on its onw but it has not. I have never taken one of these apart. I thought these would have a desiccant pack in them to help keep this from happening like my turret cams have in them.

So what's going on with this? Why wouldn't the fog\film go away and how can I fix it?

Condensation that would not clear on its own, now cleared with hair dryer.
1618334583829.png

Current image with no condensation seen.

1618334645930.png



When I zoom out, the "fog" looks like it has a diamond shaped cross hatch like pattern to it?
1618335160770.png
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,430
Reaction score
47,552
Location
USA
+1 on above, and make sure that you have the shutter as a fraction like 1/2000 for LPR or 1/100 for something else - if you have it a range like 0ms-0.5ms that can cause it to lose focus at night with what you have been experiencing. So will too big a gain spread. So to will a power outage or automatic weekly reboot. Check all of these.
 
Top