Dahua day/night switch utility - DahuaSunriseSunset

Can anyone that is still running the utility version check their utility log and see if you are having the same issue - I have had no reason to look at the log because I can tell my cameras have gone to night settings or day settings thanks to running LPR.

Tonight I was on the machine when sunset should occur and noticed my cameras hadn't changed yet, so I pull up the log and it shows it tries the sunrise first and goes thru each camera and then repeats sunrise until about a half hour later and then runs the sunset, so it is only delayed by about 30 minutes, but I can't figure out why it is doing this. Sunrise the next morning is fine. I deleted all the attempts below for simplicity, but I noticed it has been doing this since February, but worked fine previously up to that point.

I am guessing there is possibly some time code issue like what had happened before that was fixed in an update.

12/4/2022 5:18:34 PM TriggerSunsetActions
12/5/2022 8:14:14 AM TriggerSunriseActions
12/5/2022 4:47:14 PM TriggerSunriseActions
12/5/2022 5:17:10 PM TriggerSunriseActions
12/5/2022 5:17:10 PM Cancelled web request () due to the next event time being reached.
12/5/2022 5:18:13 PM Cancelled web request () due to the next event time being reached.
12/5/2022 5:18:28 PM TriggerSunsetActions
 
I'm having a problem with the new 4K-T camera not taking commands from Sunrise/Sunset but the 5241 should take those commands with no problem. Are you using IE to access the GUI of the 5241? It may be browser sensitive.

Any luck changing profiles on the 4K-T. I'm not using the utility, using the BI PTZ function but would assume it's largely the same. BI sends a sucessfull command to the 4K-T but I'm not getting it to change the profile. Thanks.
 
Any luck changing profiles on the 4K-T. I'm not using the utility, using the BI PTZ function but would assume it's largely the same. BI sends a sucessfull command to the 4K-T but I'm not getting it to change the profile. Thanks.

Are you using the API for this camera that is different than the API of other Dahua cams?

 
Are you using the API for this camera that is different than the API of other Dahua cams?


Thanks just updated BI to reflect your API call in the post.
 
Can anyone that is still running the utility version check their utility log and see if you are having the same issue - I have had no reason to look at the log because I can tell my cameras have gone to night settings or day settings thanks to running LPR.
No problem for me:

11/29/2022 7:00:32 AM TriggerSunriseActions
11/29/2022 5:23:18 PM TriggerSunsetActions
11/30/2022 7:01:21 AM TriggerSunriseActions
11/30/2022 5:23:12 PM TriggerSunsetActions
12/1/2022 7:02:08 AM TriggerSunriseActions
12/1/2022 5:23:08 PM TriggerSunsetActions
12/2/2022 7:02:56 AM TriggerSunriseActions
12/2/2022 5:23:06 PM TriggerSunsetActions
12/3/2022 7:03:43 AM TriggerSunriseActions
12/3/2022 5:23:06 PM TriggerSunsetActions
12/4/2022 7:04:29 AM TriggerSunriseActions
12/4/2022 5:23:07 PM TriggerSunsetActions
12/5/2022 7:05:15 AM TriggerSunriseActions
12/5/2022 5:23:10 PM TriggerSunsetActions
 
Can anyone that is still running the utility version check their utility log and see if you are having the same issue - I have had no reason to look at the log because I can tell my cameras have gone to night settings or day settings thanks to running LPR.

Tonight I was on the machine when sunset should occur and noticed my cameras hadn't changed yet, so I pull up the log and it shows it tries the sunrise first and goes thru each camera and then repeats sunrise until about a half hour later and then runs the sunset, so it is only delayed by about 30 minutes, but I can't figure out why it is doing this. Sunrise the next morning is fine. I deleted all the attempts below for simplicity, but I noticed it has been doing this since February, but worked fine previously up to that point.

I am guessing there is possibly some time code issue like what had happened before that was fixed in an update.

12/4/2022 5:18:34 PM TriggerSunsetActions
12/5/2022 8:14:14 AM TriggerSunriseActions
12/5/2022 4:47:14 PM TriggerSunriseActions
12/5/2022 5:17:10 PM TriggerSunriseActions
12/5/2022 5:17:10 PM Cancelled web request () due to the next event time being reached.
12/5/2022 5:18:13 PM Cancelled web request () due to the next event time being reached.
12/5/2022 5:18:28 PM TriggerSunsetActions
I’m seeing similar entries in this file…
C:\Program Files (x86)\DahuaSunriseSunset\DahuaSunriseSunsetErrors.txt
 
I’m seeing similar entries in this file…
C:\Program Files (x86)\DahuaSunriseSunset\DahuaSunriseSunsetErrors.txt

Ok, so not just me LOL. I know @bp2008 doesn't maintain the utility anymore, but hopefully he has an idea or quick fix?
 
Ok, so not just me LOL. I know @bp2008 doesn't maintain the utility anymore, but hopefully he has an idea or quick fix?

No idea. You could try manually loading those URLs from the log in a web browser on the same machine. See if they fail for some reason.
 
I was getting tons of these errors, I removed the offset time, and they stopped.

Yeah, I was thinking that was the error since it sends the sunrise command for the time of my offset time.

That tells me there is a time code error somewhere and at some point even with the removal of the offset time, the error will probably continue and then probably not work and we will be forced to do the PTZ BI workaround.
 
  • Like
Reactions: looney2ns
Hello,
is this still a Thing?I thought the Cameras switches automatically when the "normal" profile is set.Some have a Day/Night Profile as well.
I have the 5449H-ASE-D2 but it only has General/FullTime/Schedule.
Trying to get it working because i dont have a Windows Pc constantly running at the clients House.
Greets
 
Hello,
is this still a Thing?I thought the Cameras switches automatically when the "normal" profile is set.Some have a Day/Night Profile as well.
I have the 5449H-ASE-D2 but it only has General/FullTime/Schedule.
Trying to get it working because i dont have a Windows Pc constantly running at the clients House.
Greets
The day/night switch utility is an executable that is installed on a windows machine. The profiles on the cameras that you've mentioned are also discussed in this thread.
 
I thought the Cameras switches automatically when the "normal" profile is set.Some have a Day/Night Profile as well.

I had to start using this when a couple of my cameras started going berserk auto-switching back and forth at dawn.
 
Hello,
is this still a Thing?I thought the Cameras switches automatically when the "normal" profile is set.Some have a Day/Night Profile as well.
I have the 5449H-ASE-D2 but it only has General/FullTime/Schedule.
Trying to get it working because i dont have a Windows Pc constantly running at the clients House.
Greets

Some of the cameras all that the function does is switch it from color to B/W and infrared, but it uses the same settings for both (ie like you said using the normal setting 24/7 but only switching to color or B/W based on light). That works well for Dahua's intended customer that are businesses that usually have enough light.

For us homeowners, using the same shutter and brightness, gamma, gain, etc. doesn't work for sunny days and dark nights and we need two distinct settings, and that is where this utility comes in.
 
  • Like
Reactions: PM84
To clarify my own use, I use the direct method to the cameras by issuing http commands from my home automaton (Hubitat) system. This allows me to tweak the exact times, relative to sunrise and sunset, for each camera. E.g. the camera on my east side does better in day/color mode a few minutes before sunrise, while on the west the camera switches a few minutes after sunrise.
 
  • Like
Reactions: samplenhold
To clarify my own use, I use the direct method to the cameras by issuing http commands from my home automaton (Hubitat) system.

Did the same when the cameras were on an NVR. Worked very well. Since then moved to BI and isolated the cameras on a sub net (two NIC cards) plus removed the internet connection from the BI machine. i.e. no more Microsoft updates, etc.

However, Hubitat is not able to operate in that environment and thus use the Sunrise/Sunset Windows utility in its place.

Hubitat is presently being used to control outside lighting including external IR and white LED lamps for the cameras. (12 volt lamp system) Did use Hubitat sunrise/set with an offset that reliability switched lighting on and off. Now using a LUX sensor to do the same in place of time which accounts for cloudy vs clear days which time will not account for.
 
  • Like
Reactions: CAL7 and looney2ns
I am having no luck setting profiles in my new SD8C845FG PTZ. It is a new model running on 5.0 webserver.

I've tried the default http command and the new one discovered by @wittaj for the 4K. Also tried https as well. I am using the BI preset method.

This cam has several profiles including day, night, general, and several for different illumations. Im not sure how to proceed.
 
Sorry for the stupid question; in my defense, I am a mac user.

Finally had enough time at home to set up my network, firewalls and now the BI PC; once the day/night utility is up and running, where do I find it again so to edit?
 
Wherever you loaded the .exe file. You just re-execute it and go from there. I place a shortcut on my desktop to make it easier.
 
  • Like
Reactions: looney2ns