Turn on Dahua LED via API?

camviewer43

Getting the hang of it
Joined
Mar 14, 2020
Messages
176
Reaction score
50
Location
US
Is there a way to turn on the Dahua camera LEDs programmatically via an API call? Like for the IPC-Color4K-T, instead of setting a schedule or whatever, I'd like to send a API call to the camera to turn it on, at some level.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
Yes, but if you have been following the 4K-T thread, you saw that the APIs for the new GUI are different than the older GUI, so it is a matter of someone trying to figure them out LOL. I figured them out to change the profiles as that is enough for my needs, but I will see if I can figure out the API.
 

camviewer43

Getting the hang of it
Joined
Mar 14, 2020
Messages
176
Reaction score
50
Location
US
Yes, but if you have been following the 4K-T thread, you saw that the APIs for the new GUI are different than the older GUI, so it is a matter of someone trying to figure them out LOL. I figured them out to change the profiles as that is enough for my needs, but I will see if I can figure out the API.
Oh, if you can share how you're doing the profiles, maybe that'll get me started. From what you said, it sounds like maybe you use a python script to do request.post with fields associated with the "button" on the interface?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA

dubber

Getting comfortable
Joined
Oct 4, 2022
Messages
214
Reaction score
328
Location
Toronto
My turn to contribute back to the community.

Please see attached screenshot.

Instructions I got from this thread

Dahua day/night switch utility - DahuaSunriseSunset


Day Mode (substitute ID/Password/IP Address for yours)

Code:
ID:PASSWORD@IPADDRESS/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[].NightOptions.SwitchMode=0&VideoInOptions[].NightOptions.DayNightColor=0
Night Mode (substitute ID/Password/IP Address for yours)

Code:
ID:PASSWORD@IPADDRESS/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[].NightOptions.SwitchMode=3&VideoInOptions[].NightOptions.DayNightColor=0
 

Attachments

Last edited:
Top