Switching between color and black & white

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,369
Reaction score
975
Location
North Florida
Anyone know the http api command for this? I'm lookin through ftp://ftp.wintel.fi/drivers/dahua/SDK-HTTP_ohjelmointi/DAHUA_IPC_HTTP_API_V1.00x.pdf but not sure which one does it. Or do I have to just switch between day and night profile?
 

kevkmartin

Getting the hang of it
Joined
Aug 23, 2015
Messages
91
Reaction score
85
I use this to switch between day and night, and just have the parameters set the way I want (on the camera) for each mode:

Code:
if ($mode eq "night")
    {
    
    $mode_url="http://$camera_data{user}:$camera_data{pass}\@$camera_data{host}:$camera_data{port}/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1";
    
    }


if ($mode eq "day")
    {
    
    $mode_url="http://$camera_data{user}:$camera_data{pass}\@$camera_data{host}:$camera_data{port}/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0";
        
    }
 

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,369
Reaction score
975
Location
North Florida
I use this to switch between day and night, and just have the parameters set the way I want (on the camera) for each mode:

Code:
if ($mode eq "night")
    {
    
    $mode_url="http://$camera_data{user}:$camera_data{pass}\@$camera_data{host}:$camera_data{port}/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1";
    
    }


if ($mode eq "day")
    {
    
    $mode_url="http://$camera_data{user}:$camera_data{pass}\@$camera_data{host}:$camera_data{port}/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0";
        
    }
Yeah I've decided to just switch profiles instead of that one setting, I'm curious though, how are you using your code, home automation?

Sent from my Nexus 6P using Tapatalk
 

kevkmartin

Getting the hang of it
Joined
Aug 23, 2015
Messages
91
Reaction score
85
Yeah I've decided to just switch profiles instead of that one setting, I'm curious though, how are you using your code, home automation?

Sent from my Nexus 6P using Tapatalk
Yes. I have built up a "smart house" over the years. The code is from my automation server. We call her "Crystal".
 

gregbert

Getting the hang of it
Joined
Jan 9, 2017
Messages
66
Reaction score
33
Location
Lewisville, TX
@hmjgriffon

Here's the latest version (1.56) of the API doc

Dammit! Can't figure out how to escape the link to keep it from eating parts of it.
Use this.

ftp://92.247.81.210/FTP/Dahua/Integration%20and%20Development%20Materials/dahua_http_api_for_ipc_v1.56.pdf
 
Last edited:
  • Like
Reactions: cb8
Top