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?
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?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
Yes. I have built up a "smart house" over the years. The code is from my automation server. We call her "Crystal".
So all you need to do to switch profiles is send a cmd through http? Like below
http://admin:password\@192.168.2.30:port/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1
Correct, and for me the numbers are:
0 = Day
1 = Night
2 = Normal