Where in BI do you enter the web calls? I tried this before, but I need it explained like I am 5 year old.
This API call has only been tested on the Web 5 Dahua camera GUI for the SD5A425XA PTZ and HFW5442E-Z4E-S3.
One way to test the code is to run on a browser that is on the same network or subnet that the cameras are on. Usually your BI computer.
One quick test is to enter the following into your browser to check the camera time. Note: change the user name and password and the camera IP address for your specific needs.
Code:
http://admin:yourpassword@192.168.57.14/cgi-bin/global.cgi?action=getCurrentTime
This should return the following:
result=2023-12-27-15:27:08
If the test works, then modify the provided URL (sunrise-day mode) and enter into your browser. Then go to that camera's GUI in BI under camera and "Time Plan Settings". Take a look at the time line for December and it should have changed to all orange.
Also, it is best to set all of the remaining months to solid purple from 00:00:00 to 24:00:00. Complete one month and use the built in copy function.
Then use the sunset-night mode URL and the December time plan setting line will change from orange to purple.
There is also a PTZ hack that can be used to run the API code in
Blue Iris. The following explains the process.
I wanted to use stronger noise reduction at night and weaker during the day, but Dahua seems to have made a mess of the profile management. On most cameras, there doesn't seem to be a way to have the camera switch automatically between Day and Night profiles when the camera changes between...
ipcamtalk.com
With this PTZ hack, one can set the camera mode switch time to your local sunrise/set plus a time offset. The point of concern, is that the provided "Time Plan Settings" API is month sensitive. When December changes to January the month number will have to be changed from 11 to 0 in the API code that was entered into BI.
For my use, a Hubitat home automation system is used to trigger the API to change day/night camera modes. Plus another Hubitat script is used to change to the correct month number.
Changing by sunrise/sunset with an offset does work and is reliable. The present system has been altered to use LUX in place of a time offset to actually switch day/night modes based on light intensity rather than time based.