How-To: PTZ Control via DoorBell & NVR

Discussion in 'Home Automation' started by nayr, Sep 24, 2016.

Share This Page

  1. nayr

    nayr Known around here

    Joined:
    Jul 16, 2014
    Messages:
    8,039
    Likes Received:
    3,388
    Location:
    Denver, CO
    Hooking up my normal 16VAC door bell up directly to my Dahua NVR, this method requires access to just some portion of your doorbell wiring.. I am tapping into mine in the basement, because the transformer is attached to my furnace and the wiring is easiest to access there, and its also close to my NVR location.

    goal: keep PTZ parked on driveway unless someone is at the door, then change to preset to get a better view.

    video demo:


    Hardware Used:

    The wiring is pretty straight forward, I stripped back the jacket over my power cables going up to the wall mounted doorbell.. took one of the two lines, dont matter what one as long as its hooked to the doorbell transformer, then cut and stripped it.. then you put the module in place inline. It detects current passing through and does not need to be directly connected to the actual doorbell switch in any way.. which is really convenient, and its compatible with lighted doorbells.

    [​IMG]
    [​IMG]

    Now it would have been great if I could have just hooked that right into my NVR, but that unfortunately wont work.. the momentary tap of your doorbell is unlikely to last long enough for a reliable trigger.. if you hook it up like this it will work if you hold down the button for a second or so.. but you might try it, I bet a digital doorbell ringer that played audio would energize more than long enough unlike my bell striker.. I've been thinking of a westminster multi-tone unit one day, tha'd be nice.

    so thats where the timer module comes in, it takes that momentary split second switch and turns it into a longer alarm.. which is what we need to catch those delivery people who just drop, tap and run.
    [​IMG]
    [​IMG]

    Set the dips on the timer module as:
    • 1 - ON
    • 2 - OFF
    • 3 - ON
    • 4 - ON
    • 5 - OFF
    • 6 - OFF

    Wiring as follows:
    • TRG : Elk Doorbell Sensor Signal Line (w/pull up resistor installed)
    • - : To 12v Black on cut/stripped splitter end.
    • +: To 12v Red on cut/stripped splitter end.
    • NO : Alarm Input on NVR
    • COM : Ground Output on NVR, Ground Input to Elk Doorbell Sensor

    NVR Configuration screenshots attached below, Tour will change the camera display on the NVR its self.. so when the doorbell rings the grid will switch to a single view of just the front door until the alarm has ended (anti-dither), I'll post a video of it in action later.

    tip: use that grounding screw on back of chassis to provide NVR w/proper ground when you start hooking up alarm inputs.
     

    Attached Files:

    Last edited by a moderator: Sep 28, 2016
  2. tangent

    tangent Getting comfortable

    Joined:
    May 12, 2016
    Messages:
    874
    Likes Received:
    270
    Can you control normally open vs normally closed on the alarm input?
     
  3. nayr

    nayr Known around here

    Joined:
    Jul 16, 2014
    Messages:
    8,039
    Likes Received:
    3,388
    Location:
    Denver, CO
    yeah, see first screenshot..
     
    Last edited by a moderator: Sep 24, 2016
  4. tangent

    tangent Getting comfortable

    Joined:
    May 12, 2016
    Messages:
    874
    Likes Received:
    270
    Thanks, I can't believe I didn't see that in the original screenshot.

    I'm guessing you tried it without the timer? I know most alarm systems will trigger within 0.1 seconds, wouldn't surprise me if an nvr was slower than that. A different chime may not have any impact on activation time, some electronic chimes require you to put a diode or resister across the doorbell button.
     
  5. nayr

    nayr Known around here

    Joined:
    Jul 16, 2014
    Messages:
    8,039
    Likes Received:
    3,388
    Location:
    Denver, CO
    yeah I tried it w/out the timer.. it'd work if you held the button down for what felt like an unnaturally long time; it may be because you can hear my doorbell from the front door.. so once you hear the ring you let off the button.. I have a feeling if you couldent hear the doorbell ringing you'd press it longer to ensure it was fully pushed.

    I dont think they put in hardware to debounce the inputs, which is required for momentary switches or you'll register multiple presses.. they simply used software and required it to be held open for a minimum time.

    I thought about running it through my home automation system and back out another output thats held open longer, but this specific functionality I wanted to happen with as little delay as I can achieve, and without dependancies on some software running.

    ive got a spare elk door bell sensor and telephone sensor I might throw up in the classifieds soon.. once I make the install permanent and dont blow anything up.
     
    Last edited by a moderator: Sep 24, 2016
  6. nayr

    nayr Known around here

    Joined:
    Jul 16, 2014
    Messages:
    8,039
    Likes Received:
    3,388
    Location:
    Denver, CO
    added demo video to first post, I was hoping the doorbell could be heard through the mic.. but its not
     
    Last edited by a moderator: Sep 28, 2016
  7. tb10818

    tb10818 Young grasshopper

    Joined:
    Dec 24, 2016
    Messages:
    40
    Likes Received:
    17
    Wow I love this. Thanks nayr, this will be a fun project someday

    Sent from my SM-G900P using Tapatalk
     
  8. Shootmcgavin007

    Shootmcgavin007 n3wb

    Joined:
    Jan 1, 2017
    Messages:
    1
    Likes Received:
    0
    Nayr, did you ever sell your extra module? I'd love to do this but don't want to spend the $67


    Sent from my iPhone using Tapatalk
     
  9. nayr

    nayr Known around here

    Joined:
    Jul 16, 2014
    Messages:
    8,039
    Likes Received:
    3,388
    Location:
    Denver, CO
    I do still have it