[solved] Empiretech Color4m-T: prevent white light on human detection via API

pol

n3wb
Jan 15, 2025
23
5
Italy
I’m trying to fully control a Dahua camera via API, specifically to disable the white light when a person is detected at night, while still keeping IR working.
Current setup:
  • Web UI:
    • Customized Scene is selected
    • Day/Night profiles are configured
  • API:
    • Switching day/night profile works correctly
    • Changing backlight mode (WDR/HLC/etc.) works
    • Changing lighting mode (Smart / IR / etc.) works

Questions​

1) Scene selection
Is it correct to use “Customized Scene”, or does this interfere with API control of lighting behavior?

2) How to disable white light on human detection?
Goal:
  • At night → IR only
  • Never trigger white light, even if AI detects a person
What I’ve tried:
  • Setting LightingScheme[0][0].LightingMode=InfraredMode
  • Setting Lighting_V2[0][1][1].Mode=Off
I've seen that there is a table.Lighting_V2[0][1][2].AIMixLightObjFilterTypes[0]=Human but I cannot find a way to play with it. The Mode doesn't accept Off, so that's ruled out.
 
I've tried setting
table.Lighting_V2[0][1][0].Correction=50
table.Lighting_V2[0][1][0].LightType=InfraredLight
table.Lighting_V2[0][1][0].MiddleLight[0].Angle=50
table.Lighting_V2[0][1][0].MiddleLight[0].Light=50
table.Lighting_V2[0][1][0].Mode=Auto
table.Lighting_V2[0][1][0].PercentOfMaxBrightness=100
table.Lighting_V2[0][1][0].Sensitive=3
table.Lighting_V2[0][1][1].Correction=50
table.Lighting_V2[0][1][1].LightType=WhiteLight
table.Lighting_V2[0][1][1].MiddleLight[0].Angle=50
table.Lighting_V2[0][1][1].MiddleLight[0].Light=50
table.Lighting_V2[0][1][1].Mode=Off
table.Lighting_V2[0][1][1].PercentOfMaxBrightness=100
table.Lighting_V2[0][1][1].Sensitive=3
table.Lighting_V2[0][1][2].AIMixLightObjFilterTypes[0]=Human
table.Lighting_V2[0][1][2].AIMixLightSwitchDelay=60
table.Lighting_V2[0][1][2].Correction=50
table.Lighting_V2[0][1][2].LightType=AIMixLight
table.Lighting_V2[0][1][2].Mode=Off
table.Lighting_V2[0][1][2].PercentOfMaxBrightness=100
table.Lighting_V2[0][1][2].Sensitive=3

and also

table.LightingScheme[0][1].LightingMode=InfraredMode
table.LightingScheme[0][1].SchemeSchedule.Enable=false
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[0][0]=00:00:00-23:59:59 AIMode
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[1][0]=00:00:00-23:59:59 AIMode
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[2][0]=00:00:00-23:59:59 AIMode
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[3][0]=00:00:00-23:59:59 AIMode
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[4][0]=00:00:00-23:59:59 AIMode
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[5][0]=00:00:00-23:59:59 AIMode
table.LightingScheme[0][1].SchemeSchedule.TimeSectionByWeek[6][0]=00:00:00-23:59:59 AIMode

but still that damn white light is turning on when a human is detected
 
Found the solution :D first of all, to be able to control the Human,Vehicle, Both you must select "Illuminator -> Smart illumination -> check both human and vehicle"

Now that you've done that, you have full control with the HTTP API. If you don't do that, you can only have either one off Human, Vehicle, Off.

When both are selected you'll see

Code:
table.Lighting_V2[0][1][2].AIMixLightObjFilterTypes[0]=Human
table.Lighting_V2[0][1][2].AIMixLightObjFilterTypes[1]=Vehicle

then you can use the API to set whatever you like:

Code:
curl -s --digest -u "admin:${CAM_PWD}" -g "http://${CAM_IP}/cgi-bin/configManager.cgi?action=setConfig&Lighting_V2[0][1][2].AIMixLightObjFilterTypes[0]=Off&Lighting_V2[0][1][2].AIMixLightObjFilterTypes[1]=Off"

And since in step 1 we switched to "Smart illumination", remember to change the LightingMode for the night profile back to whatever it was.

Code:
LightingScheme[0][1].LightingMode

Tested on an Empiretech Color4M-T, works like a charm. Now the white light doesn't turn on if a human is detected.