Dahua day/night switch utility - DahuaSunriseSunset

I guess go into BI and can you select Preset 2 for that camera? Maybe the PTZ controls for that camera is turned off in BI?
 
I guess go into BI and can you select Preset 2 for that camera? Maybe the PTZ controls for that camera is turned off in BI?
I've tried using the manual PTZ controls; switching between Preset 1(Day) and Preset 2 (Night) for each camera, but to no effect. The PTZ controls seem to be enabled (checkbox in upper left corner) when digging into each camera's settings on the PTZ tab. Is there some other B.I. global PTZ setting that I may have inadvertently turned off, thinking that "yeah, these camera's don't have that function, so I might as well disable that control"? If so, I can't find it again, LOL.

Really odd how I can see the log file HTTP: OK 200 response after each attempted manual PTZ change, but with no actual corresponding camera mode change. Yet when I run the same API call from a browser window the cameras do switch modes correctly. Hmm...maybe I need to examine my B.I. Admin user permissions carefully, that has caught me out once before on another function (mobile app push notifications).

Edit: Ok, I checked the user permissions, and the PTZ control permissions are enabled there, so back to the drawing board...
 
Last edited:
Just an update (in case it helps someone else): my camera (admin) password contained an "@" symbol, which is a big no-no in this case, as it is also used as the separator (in the PTZ "On Call" HTTP action string) between the user: password and IP address of the camera. Apparently B.I. can't deal with that (understandably), yet oddly enough, when pasteing the same string into a browser there was no problem interpreting it and running the command.

Obviously a rare problem, but wanted to update those who helped me with this.
 
  • Like
Reactions: bp2008
Thanks for sharing that. We have seen others here get burned by that and we forget to remember that could be the problem.

It was nicer when companies could allow you to simply do admin:admin lol and it was fine because our cams were isolated from the internet.
 
  • Like
Reactions: jrbeddow
Has anyone had any issues getting this Sunrise/Sunset switching to work correctly on the EMPIRETECANDY / Dahua 5442 cameras that are running the latest (Feb. 18, 2022) firmware that just came out this week?

Unfortunately I am setting this up for the first time, so I don't know if the problems I am having are due to this newest firmware behaving differently, or just some other setup mistake/typo of my own doing. I followed the directions explicitly from the first post of this thread (using the more recent native B.I. method, not the old software utility), and I do have the cameras set to "Full time" and Always Enable "Day" in Profile Management. My daytime camera settings are forced to Color mode, and Night settings are forced to B/W, so the changeover should be obvious, but I am currently seeing only color mode regardless of time.

The B.I. logs indicate that each of the cameras do see the "Event: PTZ Preset 2 (2202)" happening, followed by the "Web: HTTP/1.1 200 OK" response at Sunset, so it would seem that they should be switching to B/W at that point, but it doesn't happen. I would think that would also indicate that my string with the Camera IPs, user/password info, and "0" or "1" at the end, is being read and interpreted correctly, but perhaps these cameras on the new firmware want to see a different number at the end (some cameras seem to need a "3", right?).

Any suggestions on other troubleshooting steps that I should take?
My 5442s from Andy are working just fine with the utility and the Feb. 2022 firmware.
 
My 5442s from Andy are working just fine with the utility and the Feb. 2022 firmware.
Yes, as I noted above in post #444, the issues are resolved, they were due to my use of an "@" symbol in my camera password, which wasn't being parsed correctly in the HTTP API command string that is used in the PTZ control presets.
 
  • Like
Reactions: 105437
I'm new to Blue Iris here and ive been trying to get my Dahua setup using the https script with calls from the PTZ presets. I have it all working and it does successfully change between day and night mode at the prescribed times, however i cannot for some reason select relative to sunrise and sunset. Does anybody else have a similar issue and a solution? I have the cooridantes setup in my global schedule time and it does show the correct sunrise/sunset but i cannot select "relative"

Untitled.jpg
 

Attachments

  • Untitled1.jpg
    Untitled1.jpg
    86.7 KB · Views: 5
Hmmm... Mine works as expected. I'm a few versions back though. Which version are you running?

Does it do the same for all presets?
 
Hmm. It looks like you need to be scheduling a time that is within 2 hours and 30 minutes of a sunrise/sunset time, or else the box gets grayed out. Adjust your time a little.
 
  • Like
Reactions: jrbeddow
Hmm. It looks like you need to be scheduling a time that is within 2 hours and 30 minutes of a sunrise/sunset time, or else the box gets grayed out. Adjust your time a little.
^Yes...I haven't tested the limits like bp2008 just did (or looked it up...what a concept), but I would call this an internal "sanity check" on the logic of referencing anything relative to sunrise/sunset if it is SO far off as to perhaps be irrelevant. Most of the time we are referencing these times as a night/day camera settings adjustment due to dramatic changes in lighting, so the offset is usually considerably less than an hour from sunrise/sunset.
 
  • Like
Reactions: looney2ns
Even setting the event time to the exact same time as sunrise and sunset the check box is still grayed out. I'm running the latest version of BI 5.5.6.9 (since i just started down the blue iris journey a few days ago)! I used to have cough cough, reolink but returned them before the window closed. BI is amazing thus far.

IS there anything i need to setup in the global schedule? I'm setup to record continous + alerts so i didnt think anything needed to be setup here. All my cameras are on profile 1.

Untitled.jpg
Untitled3.jpg
 

Attachments

  • Untitled3.jpg
    Untitled3.jpg
    212.6 KB · Views: 7
Odd..although it is unfortunate that your latest screenshots show no offset at all from sunset time. If you offset the desired time by say 15 minutes (from actual sunrise or sunset shown in the box) is the "Relative" checkbox still greyed out?
 
Odd..although it is unfortunate that your latest screenshots show no offset at all from sunset time. If you offset the desired time by say 15 minutes (from actual sunrise or sunset shown in the box) is the "Relative" checkbox still greyed out?
Grayed out no matter what time I set it for. Very strange and frustrating!
 
I ran my demo BI and it worked fine on 5.5.5.12 but after I updated it to 5.5.6.9 it was greyed out. Must be a bug. I also rolled back to 5.5.6.8 on my main BI and it works again.
 

Attachments

  • Screenshot 2022-04-07 064916.png
    Screenshot 2022-04-07 064916.png
    83.1 KB · Views: 21
  • Screenshot 2022-04-07 065047.png
    Screenshot 2022-04-07 065047.png
    80.9 KB · Views: 20
Last edited: