Dahua day/night switch utility - DahuaSunriseSunset

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,445
Reaction score
47,568
Location
USA
#Whoops carry on LOL.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,445
Reaction score
47,568
Location
USA
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?
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
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:

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
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.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,445
Reaction score
47,568
Location
USA
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.
 

105437

BIT Beta Team
Joined
Jun 8, 2015
Messages
1,996
Reaction score
881
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.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
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.
 

tbaygents

n3wb
Joined
Apr 3, 2022
Messages
14
Reaction score
6
Location
California
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

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,825
Reaction score
6,377
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?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,006
Location
USA
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.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
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.
 

tbaygents

n3wb
Joined
Apr 3, 2022
Messages
14
Reaction score
6
Location
California
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

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
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?
 

tbaygents

n3wb
Joined
Apr 3, 2022
Messages
14
Reaction score
6
Location
California
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!
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,208
Reaction score
1,472
Location
USA
Grayed out no matter what time I set it for. Very strange and frustrating!
I just looked at mine and they also are greyed out. Also are greyed out in the schedule area ?? 5.5.6.9 Still looking...
 

tbaygents

n3wb
Joined
Apr 3, 2022
Messages
14
Reaction score
6
Location
California
Thanks guys! Is rolling back BI easy? I just got it setup (I’m a new user). Can I export my settings and re import them to the previous version?
 
Top