HFW5241E-Z12E and DahuaSunriseSunset Utility

DLONG2

Known around here
Joined
May 17, 2017
Messages
763
Reaction score
455
I have this Z12 camera at full zoom for LPR collection, and am using the DahuaSunriseSunset utility to force the day and night modes. Day mode starts an hour before sunrise, and night mode starts at sunset. For the most part, the DahuaSunriseSunset utility works, but not all the time, as occasionally I'll return from work and see that the day focus is off, thereby losing a day's worth of plates. I am wondering if there's a way to serially push a command to the camera for assuring the day and night mode/focus settings are registered with the camera, say, a few times after sunrise and a few times after sunset. As it is, I keep the DahuaSunriseSunset app running for the ease of pressing the 'Simulate Sunrise" or the "Simulate Sunset" buttons whenever needed, which is too often. The utility log stubs the correct events, even when the focus later or never changes: "8/21/2020 5:27:09 AM TriggerSunriseActions" appears. Any pointers appreciated.
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,917
Reaction score
48,627
Location
USA
@DLONG2 - Try this first. In the area that says Seconds Between Lens Commands - change the number from the default 4 to a higher number. Sometimes the camera is a little slow and this accounts for it. If that doesn't work, they you can create a script to run in Task Scheduler to send a focus command every X minutes or hours, but try the first option.

Also, take a look in the errors.txt file and see if it shows any errors.

1598073837977.png
 

DLONG2

Known around here
Joined
May 17, 2017
Messages
763
Reaction score
455
Thanks, wittaj. I changed the seconds from 4 to 12 as a trial. The error log never shows any errors. Hope this helps.
 

DLONG2

Known around here
Joined
May 17, 2017
Messages
763
Reaction score
455
Moving the seconds setting to 12 seconds didn't help with the focus at sunrise today. How would I go about sending a periodic command to the camera for day and night mode?
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,567
Reaction score
2,842
A couple things. You have it going to day mode an hour before sunrise when it still pretty dark and harder for the camera to focus. Try switching it to day mode 45 minutes or so after sunrise. That way there should be plenty of ambient light for it to focus properly.

Secondly, I have my 5442-Z4E set for manual focus. That way there is no auto focusing at all when switching profiles. I'm not sure if you can do that with your camera or not however.
Screenshot from 2020-08-22 10-01-54.png
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,917
Reaction score
48,627
Location
USA
Oh yes, I missed that - definitely leave it night time settings until AFTER sunrise. You probably had some days that were clear that maybe the camera could find a focus, but on cloudy days it couldn't when it switched to day.

I ran mine for a year on full-time night setting. The night setting should be acceptable until enough daylight exists to switch it to day settings.
 

TheGooginator

Getting the hang of it
Joined
Jun 26, 2020
Messages
92
Reaction score
71
Location
California
You might also want to get current focus when you have the setting right and enter in there I do that and change it right on the sunrise and sunset and have not had any issues so far but I set a specific focus between night and day.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,306
Reaction score
3,291
Location
United Kingdom
Stupid question time but why do you need to use this util? On my 5231-ze I just use the inbuilt which seems to work fine, is there a benefit to using the util except that you can control exactly when to switch?
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,567
Reaction score
2,842
The camera auto function can be confused. Lightning or strong headlights at night can flip it back to day. Also, I've found that it wants to hold on to daylight far too long before making the move to night. By the time it switches to night you may have a hard time focusing with an LPR camera since you are working with real fast shutter speeds.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,917
Reaction score
48,627
Location
USA
The issue with the schedule in the camera (the Z12 anyway) is you can't set it and forget about it because of daylight savings time, sunrise/sunset different each day (granted you can do it in blocks), but the biggest thing is the utility allows you to put in the manual focus number which is critical for LPR at night running fast shutter speeds.

Using the camera as a plate camera requires a fast shutter speed. Most use 1/2,000 and the image is completely dark so the camera hunts for focus unless it is manually set. You cannot use autofocus at night at that shutter speed unless you are in a fully lit stadium LOL, so you need the utility to force a manual focus number that you have already pre-determined during the day. The focus number is different between color and B/W as well.

Or you run the camera 24/7 B/W at the same shutter speed day/night.

If you are NOT using the camera for reading plates, your image will then at night have either enough ambient light and/or IR so that you can actually see something on the screen and thus the camera can focus with autofocus and you can get by with the schedule in the camera.
 

Sybertiger

Known around here
Joined
Jun 30, 2018
Messages
4,676
Reaction score
13,479
Location
Orlando
Anyone notice that DahuaSunriseSunset "all of a sudden" stopped working? Even though I continue to see it running in the background it's not running the Sunrise or Sunset anymore and my cams stay in the same mode...or is it possible some of the cams just don't respond anymore.....

Capture.JPG
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
Worked for me last night and this morning like it normally has for at least a year. Anything else change(d) on your system?
 

Sybertiger

Known around here
Joined
Jun 30, 2018
Messages
4,676
Reaction score
13,479
Location
Orlando
Worked for me last night and this morning like it normally has for at least a year. Anything else change(d) on your system?
The only thing that happened was we had a thunderstorm that caused a momentary power outage...I don't think this is a coincidence that I'm seeing this issue. However, if I manually simulate sunrise or sunset with DahuaSunriseSunset the camera(s) respond. And the only other thing is I upgraded my BlueIris to a newer version but that should not have any impact whatsoever.

I haven't taken the time to figure out if it's two cams or all the cams but I do know that a IPC-T5442TM-AS and IPC-HDBW4231F-E2-M are having this issue.

p.s. I really ought to get a UPS
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,692
Location
New Jersey
I'd suspect the power failure screwed things up based on you being able to manually trigger them. Maybe, just as a CYA, re-install the sunrise/sunset utility in case something went corrupt in it.

I had a UPS going for years, then the batteries died and I didn't bother replacing them. Last "Black Friday" I picked up a new one for only a little more than the batteries would cost for the old one. Last 24 weeks it's showing over 65 interruptions, outages and noise, and I have the sensitivity set to low. Worth every penny and then some. In fact I'm ordering new batteries for the old one to handle additional equipment, just to be safe.
 

DLONG2

Known around here
Joined
May 17, 2017
Messages
763
Reaction score
455
FYI, after changing the sunrise hour offset setting from -1 to +.75 there hasn't been any focus issues on this camera. Thanks for all your assistance.
 
Top