Dahua day/night switch utility - DahuaSunriseSunset

do you or anyone know how to obtain whatever it is the camera uses to calculate the ambient brightness for an ambient conditions triggered changeover?

Sorry. I have no idea.
 
Just bought two 5241E-Z12's from Andy to use as LPR cameras. I am trying to resolve my night time focus problem and have come across a configuration issue I can't solve.

Through the camera web interface, the default speed (step) for focus and zoom is 20. Refocusing again at the speed (steps) of 5, then 1 gets the clearest focus, which on one of my cameras is 1494. Once set in the camera GUI, my granular focus setting sticks as long as I stay on the live view tab or the conditions\zoom and focus tab. If I open another tab in the camera GUI or if I log off the camera, focus moves back to the closest 20 speed setting (1494 shifts to 1500, 1484 shifts to 1480.)

I've run the devVideoInput.cgi?action=adjustFocus&focus and the sunrise/sunset program with the correct focus decimal for 1494 (.83000.) Zoom always accepts the new settings on sunrise/sunset with the change from day to night. Focus always rounds to the closest 20 speed (step) from my requested setting.

Can't understand why Dahua doesn't allow you to turn off autofocus.

Any way to change the default focus step speed from 20 to 5 (or 1)?
 
Just recently I noticed my camera profiles were not switching over. What is happening is the service is not starting. The utility service throws an error which states that utility is "not a valid win32 application". I am using the most recent version 1.6. Any idea what would cause this?
 
Try downloading again? Maybe the file got corrupted somehow.

I did that. Tried an earlier version as well. I just checked some logs and the machine had a windows update recently as well. Im thinking thats what broke it. Just not sure how to fix it.
 
Oddly, the DahuaSunriseSunset file was missing from the BI PC. I noticed that the LPR camera was not capturing many plates, and the camera image was all washed out. Just now had to re-download and configure the service.
 
Just recently I noticed my camera profiles were not switching over. What is happening is the service is not starting. The utility service throws an error which states that utility is "not a valid win32 application". I am using the most recent version 1.6. Any idea what would cause this?

I figured this out. For whatever reason the *.exe file renamed itself to DahuaSunriseSunsetexe.exe; new feature of Win10? I found a couple other third party apps had done the same. Renaming it correctly fixed it.
 
Am wondering why the utility doesn't switch to day and night anymore. I had to download and reinstall the utility after it had apparently disappeared somehow before. The app can switch to day and night manually okay by pressing the simulate buttons, but it won't switch the modes automatically. I have the sunrise offset hours at -1, and the sunset offset at 0. Should I remove and re-add the camera?

Update: The longitude was not in the negative.
 
Last edited:
I see that this won't support PTZ. I'm curious as to why? Other than the obvious (ie: PTZ not always being the same), it would be useful as I was experimenting with a PTZ and needed the focus between day/night switching.
 
It won't get focus/zoom numbers. And in the Help! button, it says that this feature is not intended for PTZ's.

I'm running a SD49225T-HN
 
It only switches between day and night profiles. PTZ is irrelevant. If you can set different PTZ parameters for day and night profiles it should work. That depends on the camera.
 
It only switches between day and night profiles. PTZ is irrelevant. If you can set different PTZ parameters for day and night profiles it should work. That depends on the camera.

Actually, it sets focus and zoom as well, and that's what I'm looking for it to do. As with any other varifocal camera.
 
  • Like
Reactions: tech101
  • Like
Reactions: djmt99 and pov2
Checking back in. Because I like to tinker and because I wanted some additional options, I wrote my own controller in .py. It's worked flawlessly for a few months now. Also the camera has actually nailed a criminal who was dumb enough to use the non-fraudulent plates.

Thanks @bp2008 for posting up the API.