Ironically it seems that VideoInMode might itself be "legacy", yet was updated to properly handle the new Customized Scene profiles? I was able to find reference to it in older Dahua/Amcrest API guides. The most recent I was able to find it in is V2.63 (you can Google for it), but in that doc version it only has the values 0 and 1 for mode, and doesn't really explain what Config[] is for that section. It just implies it will have specific static values depending on what the value of Mode is. It seems Mode 0 may also work for reliable external control as the guide notes that should be "no switch", but I'm not sure if that's still true on these newer models. Regardless I'm going to give my setup a shot using this endpoint and ConfigEx, rather than the Day/Night specific ones.
excuse me for chiming in Guys, i lately posted a thread about a dahua bullet cam with details etc and nobody helped...
yet i see this thread, im a power user, but i dont understand one bit of what you discussing here.
The Dahua (and their rebrand) cameras has gone through different web UIs over the years, and the most recent two are V4 (which is grey and orange) and V5 (which is white and blue). Noting these is just helpful when clarifying where settings are because they have changed over time (new ones added,, etc).
The Web API is a separate thing that has also gone through various versions. It's a separate way to control the camera via making HTTP requests (in essence, the same thing as putting a URL in your browser) that offers more control that what you can just do through the UI alone. Unfortunately, they use a very old CGI approach and the API is somewhat cryptic and confusing in its nature. Not the most useable thing, but it seems to often get the job done.
Hubitat is a smart home platform, like Home Assistant, Samsung SmartThings, and (if I must include them) Amazon Alexa and Google Home.
A number of people, whether they be programmers, IT people, or are just good at tinkering, use things they have setup with their smart homes (i.e. sunrise/sunset data, light sensors, etc) to change their camera settings on-the-fly for a better image, depending on various conditions. The only way to do that programmatically is via this HTTP API.
This goes into a number of subjects that are complex and broad for a beginner.
I can only say I wish that not only was the API less of a beast, but that the cameras/Web UI had deeper features that reduced the need for the API's use in the first place, especially for the average user.
@Alaska Country The Web 5 example does work for going between Day/Night but sadly cannot seem to switch into the other profiles for Customized Scene. I think I'd be satisfied with two profiles, but maybe I can figure out how to switch to the others.
@Vettester, I just wanted to clarify a couple things. I see in your original post (which was presumably for your older camera), you modify the final .Config0 value, which doesn't work on my newer camera (as I imagine is expected). Your last example seems to go into day/night by using
head.NightOptions.SwitchMode=0 i.e. "NoSwitch, always use day options."
for day (while also forcing color mode) and
head.NightOptions.SwitchMode=3 i.e. "NoSwitch, always use NightOptions."
for night (while also forcing B/W mode).
Do you happen to know how to get into General Mode on your newer model? Perhaps
head.NightOptions.SwitchMode=3 i.e. "NoSwitch, always use NormalOptions" ? Of course I could manipulate the NormalOptions section via the API directly, but I'd prefer if it lined up with a profile shown in the UI.