automatic control of black/white and IR

GKyle840

Young grasshopper
Joined
Dec 18, 2018
Messages
93
Reaction score
18
Location
Ohio
In blue Iris or the Dahua web gui I was wondering if there is a setting to automatically control the IR light and color and black/white mode? the reason I am looking for this is on dark nights I like the picture better with the IR light on and black and white mode. the other half of the time everything is clearer in color mode as my porch lights are quite bright and especially when there is snow on the ground.
my camera is a dahua ipc-hdw5231r-ze
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
In blue Iris or the Dahua web gui I was wondering if there is a setting to automatically control the IR light and color and black/white mode? the reason I am looking for this is on dark nights I like the picture better with the IR light on and black and white mode. the other half of the time everything is clearer in color mode as my porch lights are quite bright and especially when there is snow on the ground.
my camera is a dahua ipc-hdw5231r-ze
no...the dahua if you allow it can rely on the photocell but that will likely not give you the results you want.
 

GKyle840

Young grasshopper
Joined
Dec 18, 2018
Messages
93
Reaction score
18
Location
Ohio
when it relies on the photocell is that just the "smart IR" mode in the dahua settings? I do have that set to on as opposed to it being either on or off.
 

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,628
Reaction score
22,875
Location
Evansville, In. USA
when it relies on the photocell is that just the "smart IR" mode in the dahua settings? I do have that set to on as opposed to it being either on or off.
No, smartir is so the cams IR illumination can adjust it's intensity to the scene.
 

Q™

IPCT Contributor
Joined
Feb 16, 2015
Messages
4,990
Reaction score
3,990
Location
Megatroplis, USA
  1. Perhaps someone could post the procedure for setting up Dahua cameras so that the camera detects the ambient light level and switches to day settings or night settings as dictated by the camera's light level sensor?
  2. Is this possible?
  3. Is a specific Dahua firmware required to accomplish this?
My issue is inside my warehouse where there is no natural light. Lighting inside my warehouse is provided by florescent lights which are turned on and off many times during the day.
 
Last edited:

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,240
Location
SF Bay Area
I think these are the API commands you need to use... See the REFERENCE section below.

A. SET PROCEDURE:

Step 2 does the job, but I strongly recommend you do step 1 to document your starting point.
You will be asked for your camera credentials the first time (use an admin account).
Note: replace {cam_ip&port} with your camera's full ip address, e.g., 192.168.1.200:8500.
I suggest all the separate tabs only the first time you play with this. It facilitates testing and experimentation.

1. In a new browser tab, GET all current 'VideoInOptions' settings...
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions

In two more browser tabs, GET the specific properties of interest
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions[0].NightOptions.Profile
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions[0].NightOptions.SwitchMode

2. In separate browser tabs, SET the properties of interest
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].NightOptions.Profile=3
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].NightOptions.SwitchMode=1

~~~~
B. RESTORE PROCEDURE

Note: You may made not need the second api command. It sets full time 'Day' profile. Use 1 for 'Night'.

1. In separate browser tabs, SET the properties of interest
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].NightOptions.SwitchMode=0
http://{cam_ip&port}/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0

~~~~~
BACKGROUND INFO

THESE COMMANDS SET THE DESIRED OPTIONS
action=setConfig&VideoInOptions[0].NightOptions.Profile=X ... where X =
0: use temporary day options;
1: use temporary NightOptions;
2: use temporary NormalOptions;
3: depends on head.NightOptions.SwitchMode

action=setConfig&VideoInOptions[0].NightOptions.SwitchMode=X
... where X =
0: NoSwitch, always use day options
1: Switch depends on brightness
2: Switch depends on time
3: NoSwitch, always use night options
4: NoSwitch, always use normal options

THESE COMMANDS GET/RESTORE THE PROFILE
action=getConfig&name=VideoInMode[0].Config[0]
action=setConfig&VideoInMode[0].Config[0]=X
... where X = 0|1|2 (Day|Night|Normal)

~~~~~
IMAGES:
Image 1 is what I observed BEFORE executing any of the commands above.
Image 2 is what I observed AFTER executing api commands A2.
Image 1 is what I observed AFTER executing api commands B1. This is the equivalent of selecting the 'Full Time' radio button in Image 2 , then clicking 'Save'.

Image 1
profile mgt before.png

Image 2
profile mgt after.png
 
Last edited:

Q™

IPCT Contributor
Joined
Feb 16, 2015
Messages
4,990
Reaction score
3,990
Location
Megatroplis, USA
I think these are the API commands you need to use
Thank you, but I don't understand exactly what these "set" and "restore" procedures accomplish. Could you please speak some regarding the goals and the methods a bit please?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,240
Location
SF Bay Area
I understand. Just try the 2 commands in step 2A. The rest are useful for understanding what’s going on under the hood, which I’ve been playing with lately.
Now back to the Warriors game; 51 points the 1st quarter!
 

aristobrat

IPCT Contributor
Joined
Dec 5, 2016
Messages
2,983
Reaction score
3,180
  • Perhaps someone could post the procedure for setting up Dahua cameras so that the camera detects the ambient light level and switches to day settings or night settings as dictated by the camera's light level sensor?
  • Is this possible?
  • Is a specific Dahua firmware required to accomplish this?
IIRC, it was specific to a firmware version and removed from the latest firmware version (at least with the 5231s).
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
regarding the OP, yes, one can control dahua cam IR on/off programaticaly in BI from the cam's schedule tab,
(assuming you have the right protocol selected in the ptz control tab) and it'll even adjust for sunrise/sunset
change in your timezone if you so choose. look for 'IR LEDs on/off' in the function pulldown, forcing day/night switch...
 

GKyle840

Young grasshopper
Joined
Dec 18, 2018
Messages
93
Reaction score
18
Location
Ohio
I was also curious if there was a way for BI to control the color, black and white and IR based on the lighting conditions so on nights where there was snow on the ground it could do color mode and nights without it could do B/W with and without the IR depending on the amount of ambient light available.
 

GKyle840

Young grasshopper
Joined
Dec 18, 2018
Messages
93
Reaction score
18
Location
Ohio
So far it hasn't seemed to like dealing with that. I'm going to get an external IR and try just keeping it in B/W mode at night and see how that pans out. My cameras dont seem to like the long narrow throw of the built in IR light.
 

th182

BIT Beta Team
Joined
Sep 11, 2018
Messages
690
Reaction score
1,205
Location
Minnesota
I just started playing with the Day-Night switch utility yesterday. I installed it and saw that it works but haven’t had time to play with much in the way of settings to see if it does what I want. Dahua day/night switch utility - DahuaSunriseSunset hopefully this weekend I can experiment.

Is there a particular PTZ protocol to select so that IR can be controlled with the IR button in blue iris? Or maybe a camera setting? The switch utility works to change profiles. But the Blue Iris buttons don’t seem to do anything. It’s a varifocal and the zoom works, just no IR control.


Sent from my iPhone using Tapatalk
 

Q™

IPCT Contributor
Joined
Feb 16, 2015
Messages
4,990
Reaction score
3,990
Location
Megatroplis, USA
just started playing with the Day-Night switch utility yesterda
There are two (2) different issues here. Both issues revolve around automatic switching between day and night profiles.

The original topic post inquires about automatic Dahua camera switching based upon ambient light level; this is my interest which I need to resolve light levels inside my warehouse where lighting is turned on and off throughout the day.

Other members have posted asking for sunrise/sunset switching which — according to my LIMITED knowledge— can be accomplished with @bp2008’s Sunrise/Sunset utility.

I encourage members who need such functionality to search for Brian’s utility and to leave this topic focused on switching based on ambient light level. Thanks to @aristobrat for providing the following link to Brian's sunrise/sunset utility...

Dahua day/night switch utility - DahuaSunriseSunset
 
Last edited:

Q™

IPCT Contributor
Joined
Feb 16, 2015
Messages
4,990
Reaction score
3,990
Location
Megatroplis, USA
Just try the 2 commands in step 2A. The rest are useful for understanding what’s going on under the hood, which I’ve been playing with lately.
Now that is what I call I N T E R E S T I N G !

My results are attached, but what is more interesting is that in the Dahua camera's Web UI, Settings > Conditions > Day & Night it is no longer possible to edit "Mode," "Sensitivity," or "Delay" as these edit boxes are grayed out and are no longer user accessible. Can't wait to see what happens when someone cycles the lighting!
 

Attachments

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,240
Location
SF Bay Area
what is more interesting is that in the Dahua camera's Web UI, Settings > Conditions > Day & Night it is no longer possible to edit "Mode," "Sensitivity," or "Delay" as these edit boxes are grayed out and are no longer user accessible.
@Q™ Are you able to restore the user accessibility in Settings > Conditions > Day & Night by using the first restore command in B1?

I am... here's what I see... And I should note that the edit boxes are grayed out for every Profile selected in the drop down control.

After sending command
http://{ip&port}/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].NightOptions.SwitchMode=1

Conditions-D&N-SwitchMode1.png

After sending command
http://{ip&port}/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].NightOptions.SwitchMode=0

Conditions-D&N-SwitchMode0.png
 
Top