I tried the PTZ hack but it didn't work. Maybe I need to revisit it. It's a pity we either don't have an app or Dahua don't integrate something into the camera to switch it over. One thing I have found with set time switchovers is if you get a stormy dark day, it switches too late. Set it for that time and get a bright sunny day, and it can be too early, by as a much as an hour or more in either situation. Some kind of light level detection in camera definately sounds the way to go if it can be made to work well. Maybe as well as a time schedule, Dahua should offer a lumen setting so when the lumen hits a certain level, that's the trigger for the camera exposure profile switch rather than the fixed time. Feedback from Andy to Dahua?
You probably have an extra space or something because the API works. The first thing to do is to try the command in the CMD and confirm you have it correct. Once it switches there then put it into the PTZ hack.
In the past, most of the cameras all that the built-in function does is switch it from color to B/W and infrared, but it uses the same settings for both (using the normal setting 24/7 but only switching to color or B/W based on light). That works well for Dahua's intended customer that are businesses that usually have enough light.
For us homeowners, using the same shutter and brightness, gamma, gain, etc. doesn't work for sunny days and dark nights and we need two distinct settings, and that is where this utility comes in.
We have tried for years passing feedback to Andy/Dahua, but we are not their intended market.
Now with that said, it does appear that the cameras with the newer GUI do switch they way they are supposed to (or the way we want them to), so give that a try and see if it works for your use case.