Dahua day/night settings - the basics

marklyn

Pulling my weight
Joined
Jun 13, 2015
Messages
467
Reaction score
107
I'm pretty sure I'm current on my fw, I usually am on all cameras unless there is a specific reason why I shouldn't update. So you tried the example scripts I originally posted?
 

aristobrat

IPCT Contributor
Joined
Dec 5, 2016
Messages
2,983
Reaction score
3,180
Both Blue Iris and @bp2008’s DahuaSunriseSunset tool use the latitude/longitude of the location you tell it to compute the sunrise/sunset time each day.
 

MikeMullen

n3wb
Joined
Nov 14, 2017
Messages
2
Reaction score
0
I too was bummed at my two higher end Dahua's can't automatically select a day/night profile based on a sensor rather than a profile time setting.
I know that there BP2008 has an app out there that goes by lat/long to automatically set day/night and someone else mentioned a script that could be run but I got to thinking...
There is a command line you can use to do different camera functions, one of them being turning on a profile.
So here are the basic steps I followed to make this work with no external app/script and just using Blue Iris and the two models of Dahua cameras I have.
1) Main Blue Iris options: Schedule: enable it and I used civil twilight. Plugged in my area's lat/long.
2) Edit one of my Dahua camera properties go to Schedule then override global schedule, then goto event schedule, enable it then click Add. I checked the "relative to sunrise/sunset" and entered the time for this event for what it says will be sunrise (ie: 7:15:00 am). All profile boxes checked. For function I chose any blank preset (my Daylight is 13 and night is 12). Before you OK this make sure the "search back at startup/reset" is checked.
3) Now go to your PTZ/Control tab for that camera's settings. Choose edit presets and choose whatever preset you chose in previous step (assuming you're doing day profile first). Now in the http:// or script box put this:
http://login_name: Password@ip-address: Port/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0

The example steps is for the day profile.
The night profile is identical except you choose another preset in step 2 & 3 and use this script:
http://login_name: Password@ip-address: Port/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1

The "normal" profile is the same, except I think it ends in "2" and obviously you use your own login/pw, ip and port for your cameras.

Anyway I just tested this out and it does seem to work so if this is the case then no external scripts would be needed to run, just use blue iris. Should work on other camera manufacturers that allow http commands.
Would appreciate if it others play around with this and let me know if this seems to be solid. I hope I didn't leave anything out! :) and sorry if it's too concise.

**** IMPORTANT*** there are no spaces in the two script examples above but I couldn't do plain text so a colon with a p right after it became :p I couldn't figure out how to turn on plain text mode for this!
 

drdre84

n3wb
Joined
Jun 30, 2019
Messages
14
Reaction score
2
Location
australia
ipc hdw4631c-a x 6
nvr 4208-8p

issue with motion detect triggering (going off) when the cameras switch between day / night mode at around 7am and 8pm.
idmss sends the alert every day on the hour when the day / night switch occurs.

does anyone know how to fix this . or would the only work around be turn motion detect off for the minute it switches between.?
 
Joined
Apr 26, 2016
Messages
1,090
Reaction score
852
Location
Colorado
my Dahua cameras wouldn’t accept the username and password being passed in the URL.
@aristobrat I believe I had read somewhere (cant find the link), that both IE and Chrome had removed basic authentication in the URL “for security reasons”, but that Chrome might have added a flag to allow the user to renewable it sometime afterward. My point is only it might depend on the browser/technology you are using whether it works.
 
Top