Controlling Camera LEDs

Doland

n3wb
Joined
Apr 17, 2022
Messages
5
Reaction score
3
Location
Canada
hi guys,

I'm new to the community, and Blue Iris in general. I just installed the demo though, and its a nice change compared to the lackluster features available on my Dahua NVR.

I have what appears to be a complicated question that I'm hoping someone can provide some guidance on. I have a few Dahua IPC-HDW2439TN-AS-LED-S2 cameras. They are low light color cameras, but come with a built in LED. The Dahua software only lets me turn them on permanently, turn them off permanently, or turn them on automatically based on light thresholds.

Interface screenshot showing settings:
1650180502506.png

I'm wondering if anyone has advice on how to trigger the illuminator based on motion? I bought them thinking the automatic setting actually did this, but much to my dismay, it only turns on when the camera detects there is low light. The Dahua cameras let me set the illuminator setting to (manual, off, automatic) for 3 profiles (day, general, night). Would it be possible to change the profiles through motion action in BI, or even control the illuminator function directly? Thanks for your time!
 

Doland

n3wb
Joined
Apr 17, 2022
Messages
5
Reaction score
3
Location
Canada
hi @TonyR, thanks for the reply.

Seems like you guys answered this in API to turn on light for the IPC-HDW3849H-AS-PV

The following is working when testing in my web browser. I'm going to fiddle with adding the username and password, and setting it up as a trigger. I'm glad i stumbled into this great community. thanks again.
ON:
OFF:
 

alecz

Young grasshopper
Joined
May 16, 2023
Messages
57
Reaction score
11
Location
Montreal
hi @TonyR, thanks for the reply.

Seems like you guys answered this in API to turn on light for the IPC-HDW3849H-AS-PV

The following is working when testing in my web browser. I'm going to fiddle with adding the username and password, and setting it up as a trigger. I'm glad i stumbled into this great community. thanks again.
ON:
OFF:
Thanks for this post!
I just want to add that this also works for Dahua HDW2439T-AS-LED-S2. In the browser is asks for Digest Authentication.

EDIT: Did you ever figure out how to send the authenticated request through Blue Iris?
 
Last edited:

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,778
Reaction score
39,045
Location
Alabama
Last edited:

alecz

Young grasshopper
Joined
May 16, 2023
Messages
57
Reaction score
11
Location
Montreal
This request seems to change the config setting, but not apply it. When I go to the camera, I see the setting is change, but the lights don't turn on/off until I go and click Save.

EDIT:

The forum has some older threads that suggest
/cgi-bin/configManager.cgi?action=setConfig&Lighting[0][1].Mode=Off
but (at least for newer cameras), need to use Lighting_V2
/cgi-bin/configManager.cgi?action=setConfig&Lighting_V2[0][0][0].Mode=Off
 
Last edited:

alecz

Young grasshopper
Joined
May 16, 2023
Messages
57
Reaction score
11
Location
Montreal
I personally have not needed to do so but you should be able to have BI send the HTTP URL as below from "Alert" => "Action set" => "Web request or MQTT"

http://Camera-user: Camera-password@Camera-IP/cgi-bin/configManager.cgi?action=setConfig&Lighting[0][1].Mode=Auto
Yes, but setting the authentication is a different story. You need to put a header in BI (Basic Authorization works) with the encoded password.

For basic Authentication, you can simply use the browser's JavaScript to encode (no need to look for online tools and risk leaking your credentials):

  1. Open developer tools and in the console (F12 in Firefox) and enter (replace with your actual username/password):
    btoa("username:your_password")
  2. This will return something like "dXNlcm5hbWU6cGFzc3dvcmQ="
  3. Enter the following in the Header section of MTTQ:
    Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
  4. This will authenticate the request.
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,778
Reaction score
39,045
Location
Alabama
Yes, but setting the authentication is a different story. You need to put a header in BI (Basic Authorization works) with the encoded password.
Maybe with that camera or others or if one feels compelled to do so, as I've sent HTTP API's to many Dahua and Dahua-OEM cameras with just basic authentication, no encoding, before the camera's IP address as shown in my post # 5. :cool:
 
Top