The CGI commands for switching between night and day profiles are….
for night
http://192.168.xxx.xxx/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1
for day
http://192.168.xxx.xxx/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0
Those CGI commands worked great with older cameras, but don’t work with the new Web 3.0 interfaces firmware unless ones does the Self-Adaptive mode work around
You manually send the CGI commands via a browser or programatically. In python, I do the following two day and night scripts
#==================== NIGHT MODE Python Script =======================
import requests
from requests.auth import HTTPDigestAuth
import time
#street west night ====================
try:
#night profile
url = 'http://192.168.xxx.xxx/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(10)
#focus mode manual = 4, auto = 2, semi auto = 3
url = 'http://192.168.xxx.xxx/cgi-bin/configManager.cgi?action=setConfig&VideoInFocus[0][1].Mode=4'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(1)
#zoom and focus for night position
url = 'http://192.168.xxx.xxx/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.840556&zoom=0.549917'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(1)
#force autofocus
url = 'http://192.168.xxx.xxx/cgi-bin/devVideoInput.cgi?action=autoFocus&channel=1'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(1)
except:
a = 1
#==================== DAY MODE Python Script =======================
import requests
from requests.auth import HTTPDigestAuth
import time
#street west ====================
try:
#day profile
url = 'http://192.168.xxx.xxx/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=0'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(10)
#focus mode manual = 4, auto = 2, semi auto = 3
url = 'http://192.168.xxx.xxx/cgi-bin/configManager.cgi?action=setConfig&VideoInFocus[0][0].Mode=4'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(1)
#set zoom and focus for day position
url = 'http://192.168.xxx.xxx/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.886111&zoom=0.639767'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(1)
#force autofocus
url = 'http://192.168.xxx.xxx/cgi-bin/devVideoInput.cgi?action=autoFocus&channel=1'
requests.get(url, auth=HTTPDigestAuth('user', 'password'))
time.sleep(1)
except:
a = 1