Switch on / off Infrared with http command

Discussion in 'Dahua' started by Cor, Sep 3, 2019.

Share This Page

  1. Cor

    Cor Getting the hang of it

    Joined:
    May 5, 2017
    Messages:
    151
    Likes Received:
    15
    Greetings,

    I just installed a Dahua IPC-HDW4631C-A (has Onvif). I would like to turn on and off the IR with a http command , directly in the camera , or via Blue iris. This to controll the IR via my home automation.

    Does anyone know if this is possible? If yes , How to do this?

    Many thanks,
    Cor
     
  2. jaydeel

    jaydeel BIT Beta Team

    Joined:
    Nov 9, 2016
    Messages:
    137
    Likes Received:
    102
    Location:
    SF Bay Area
    For Blue Iris, try these
    {ip_addressANDport}/admin?camera={cam-short-name}&ptz=34 ... off
    {ip_addressANDport}/admin?camera={cam-short-name}&ptz=35 ... on
    {ip_addressANDport}/admin?camera={cam-short-name}&ptz=36 ... auto

    But beware that these commands do not actually turn the IR On/Off, but rather
    34 ('off') sets Dahua 'DayNight' mode to 'Color'
    35 ('on') sets Dahua 'DayNight' mode to 'B/W'
    36 ('auto') sets Dahua 'DayNight' mode to 'Auto'

    You might want to check out DahuaSunriseSunset.
     
    Last edited: Sep 9, 2019
  3. Cor

    Cor Getting the hang of it

    Joined:
    May 5, 2017
    Messages:
    151
    Likes Received:
    15
    @ Jaydeel: Thank , will try that in the weekend.

    Not changing the IR to on/off , but the day/night mode, does that have other consequences as to only the IR?

    Thanks,
    Cor
     
  4. jack7

    jack7 Young grasshopper

    Joined:
    Mar 21, 2019
    Messages:
    42
    Likes Received:
    22
    Location:
    USA
  5. jaydeel

    jaydeel BIT Beta Team

    Joined:
    Nov 9, 2016
    Messages:
    137
    Likes Received:
    102
    Location:
    SF Bay Area
    Dahua's logic regarding its Day/Night profiles has puzzled many of us. To really appreciate the topic, I'd suggest you skim the various threads turned up by this google search site:ipcamtalk.com dahua ir daynight.

    If you are just trying to control the IR leds around sunrise & sunset, the best shortcut is to use the DahuaSunriseSunset utility.
     
  6. Cor

    Cor Getting the hang of it

    Joined:
    May 5, 2017
    Messages:
    151
    Likes Received:
    15

    I have just tried the codes , but no joy yet.
    I do get a reply from blue iris , like : signal green, profile 2 etc
    http://192.168.68.20:84/admin?camera=Kitchen&ptz=35

    is the code correct "ptz=35" , is that not for a PTZ command?
    The camera settings , in profile management , which setting does it need , so blue iris can change it?
    "normall"-"full time"- "schedule".

    Thanks,
    Cor
     
  7. jaydeel

    jaydeel BIT Beta Team

    Joined:
    Nov 9, 2016
    Messages:
    137
    Likes Received:
    102
    Location:
    SF Bay Area
    I've just re-tested and verified that these commands work for me.

    Are your web-server's authentication settings set up like this?
    (Settings > Web server > 'Advanced...')
    upload_2019-9-9_13-33-27.png

    If so, you will need append your credentials to the command:
    http://192.168.68.20:84/admin?camera=Kitchen&ptz=35&user=admin&pw=admin

    Or you can to change the settings and restart the Blue Iris service. (Mine is 'Non-LAN only' & checked).

    Also, let's confirm that you are specifying the cam-short-name in the command. If you are, then when you use the command http://192.168.68.20:84/admin?camera=Kitchen, you should see the following...
    Code:
    signal=green
    profile=1
    lock=0
    camera=cam-long-name
    If you mean a preset command, then no. The preset command is:
    /admin?camera=x&preset=n Goto PTZ preset n on camera x (short name)

    The 'ptz=' command appears to be used for some of the non-preset items on the camera right-click context menu.
    The Blue Iris 5 Help PDF lists only the following:
    /admin?camera=x&ptz=n PTZ command n on camera x (short name)
    where n=0,1... for left,right,up,down,center,zoom+,zoom-


    The IR 'ptz=' commands are, as far as I know, officially undocumented. I found them a few years ago via google.
     
    Last edited: Sep 9, 2019
  8. Cor

    Cor Getting the hang of it

    Joined:
    May 5, 2017
    Messages:
    151
    Likes Received:
    15
    Thanks,

    I just tried again. I do get a response in my browser:
    signal=green
    profile=2
    lock=1
    camera=Kitchen


    But no change in IR -light , when I switch it on or off in the GUI from the camera I do see the IR light comming on or off.
    What settings do I need to set in GUI of the camera?
    -in Profile management I have: Normall - full time- schedule.
    -in conditions IR-light I have set: day : OFF , night: "manuel 80%"

    But with these settings; I don;t see a change in the camera.

    Thanks,
    Cor