Dahua day/night switch utility - DahuaSunriseSunset

6 minutes is not close? :blankstare:

No!!

The point is that the utility states the time it will switch to day or night mode. That is the expected behavior and not some random time that is sort of around the calculated data.

It would be like your bank telling you that your account is in the range of $3,500 to $4,500. It is a computer thing and we realy do not know. But just keep spending and we will send you an over draft notice plus a $45 over draft fee once we figure it out. Would you find that acceptable?
 
Is your lat and long correct?

Edit: oh I see. It’s telling you the correct times but switching at different ones.
 
Edit: oh I see. It’s telling you the correct times but switching at different ones.

Yes, that is correct. The utility has an option that one can select to display the switching times as calculated by the sunrise/sunset Dahua utility. That is the time that is being compared to the actual switch time generated the utility. i.e. click on "View rise/set" button in the utility.

If the utility listed sunrise at 5:15:55 AM, then the camera switch should be within a few seconds of that utility calculated time.

Overall, I would like to use LUX that would switch within a sunrise/sunset time window. However, the utility does not have presently have that capability to switch on LUX values obtained from an external sensor.

May delete the utility program on the Windows computer and reinstall and see if caculated vs switch times change.
 
Does 6 minutes of 'extra' night mode result in a loss of footage/event capture?

I have not yet dabbled with the utility. Does everyone else see their cameras change modes exactly at the time of sunrise/sunset on the given day (factoring in any user defined offset, of course)?
 
Does everyone else see their cameras change modes exactly at the time of sunrise/sunset on the given day (factoring in any user defined offset, of course)?
I never looked before, so I just checked when they went to night tonight. I can't see when they were supposed to change, but they changed at 8:21:09 pm tonight, and the predicted time for tomorrow night is 8:20:31 pm.
 
Yes, please do check. It will be interesting to know if there is an issue on this end or if the utility has issues.

Here is a screen shot of the data for the 26th.
Sun 7-26-22.PNG
And below for the 26th set and 27th rise times.
Sun 7-26 and 7-27.PNG
Utility and box in lower left to select View rise/set times as calculated by the utility.
Utility Dahua.PNG
 
How did you determine when the actual camera switch happened? Was looking at mine to check but don't see that.
 
Got it. Mine has flipped days to the 27th so can't see the 26th now. Not sure what it would have been for EDT Mid-Atlantic latitude.

Actual from the log was:
7/25/2022 6:05:00 AM TriggerSunriseActions
7/25/2022 8:27:58 PM TriggerSunsetActions
 
On this end checked the switch times using the timeline on Blue Iris UI3. That way can see if all the cameras switch at the same time or if one is ahead or lagging.

The suggestion of the utility's log is excellent. It does confirm the switch time at:
7/26/2022 5:24:54 AM TriggerSunriseActions

However, there are a ton of exceptions and web requests which would be an indicator of something is not setup properly on my end. The utility may just be fine, but can not execute the command at the proper time for some reason.

Here is a short list of the error messages that would appear to need a fix. Note the URL's refer to individual camera IP addresses.

short_log.PNG
 
Hmmm... again, actuals from the log as above vs / time I see change on cam:

7/25/2022 6:05:00 AM TriggerSunriseActions / 5:54:51
7/25/2022 8:27:58 PM TriggerSunsetActions / 8:35:09

So a little earlier at sunrise, a little later at sunset.

Offset in utility is 0.
Cams are synched to local time server which looks to be serving up the right time. Time on server running utility matches local time server.
 
I've decided to select the profile "DAY/NIGHT" in 3 cameras. and see how that goes.
I was having some cams that were in the wrong mode, for the given amount of light,
and opted to disengage them from the Sunrise/Sunset settings.
2 of them are 5442's and one is a 2231-ZS.
i'm having less fuss and muss at the moment.
 
totally forgot about the log file.

For sunset on 7/26, log states 8:21:08 PM, cams switched at 8:21:09 PM
1658901366896.png
 
  • Like
Reactions: Flintstone61
Have used day/night and it works well for some camera settings based on the camera's internal light sensor. However, have a few of the Dahua 5849 (Color X) units and they do not have a day/night setting. i.e. no internal light sensor. Thus the need for an external switch. Thus trying to switch all the cameras at the same time using the utility.

Yes, there is a schedule that can be used to switch the 5849 units. But is set up per month. Here, the time changes at the rate of 5 plus minutes per day during portions of the year. By the end of the week switch times are off by 40 minutes per week.

Mike this does look like the same issue? If several are seeing this, then it would appear that the utility is not performing some function correctly. IMO, the switch should occur at the time calculated by the utility and not perhaps some random later time.

The good part is that a switch does occur, but not at the expected time.
 
Your log looks very nice. Mine is a mess. Whatever you are doing is correct and your switch times are right on.

Now to determine what I have to change to make the utility play well on my Windows 10 system.
 
Last edited:
Whatever you are doing is correct and your switch times are right on. '
It's not like there is a lot of setting it up to do.

I do not use the zoom or focus entries. I do not have the https box checked. I use 6 as the value for seconds between lens commands.
 
Here is an image of that same box. There is not much to setup. Not using zoom or focus.

Camera-Settings.jpg

It would appear, that in my case, the interaction between the utility and Blue Iris is the issue. Something is perhaps not setup properly on the BI side.
 
The utility log prior to 7/12/22 looks fine. It is after that date when the errors started.

Utility calculated sunset at 10:55:11 PM.

Sun 7-26 and 7-27.PNG
Log of actual sunset time including error messages. Actual switch occurred at 11:02:57 PM.

Log-7-26-22-Evening.PNG
 
Last edited:
the interaction between the utility and Blue Iris is the issue.
This utility does NOT interact with BI. It only interacts with each cam that is in the list.

I have only gotten that error when either the user name or password were incorrect, or the cams were offline usually due to a power failure.
 
Your log looks very nice. Mine is a mess. Whatever you are doing is correct and your switch times are right on.

Now to determine what I have to change to make the utility play well on my Windows 10 system.

If you're seeing a ton of web requests are you sure the problem isn't with your internet connections stability?

I have to wonder if your connection is dropping thus generating the repeated requests.