Turn on Dahua LED via API?

camviewer43

Getting the hang of it
Mar 14, 2020
177
50
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.
 
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.
 
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?
 
  • Like
Reactions: sebastiantombs
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

  • PTZ.jpg
    PTZ.jpg
    374.9 KB · Views: 20
  • Schedule.jpg
    Schedule.jpg
    203.1 KB · Views: 21
Last edited: