NodeJS Module: node-dahua-api

Discussion in 'Dahua' started by nayr, Feb 17, 2016.

Share This Page

  1. nayr

    nayr IPCT Contributor

    Joined:
    Jul 16, 2014
    Messages:
    9,347
    Likes Received:
    5,239
    Location:
    Denver, CO
    every other VMS software does it the way I described; so must only sound silly to your ears.. like I said, you can always give names to those numbers in your own app.

    I did a quick look through the API Docs, http://contenidosdigitales.net/plan...amientas/api/DAHUA_HTTP_API_FOR_DVR_V1.29.pdf

    I see a command SetPresetName that will allow you to set the name, but I found absolutely nothing for retrieving that information.. if you look, everything else involving presets wants the numerical ID.

    Just because something is possible in WebUI dont mean there is an equivalent API all for it, if you find anything in that doc I overlooked leme kno
     
  2. AlexV

    AlexV n3wb

    Joined:
    Jan 20, 2017
    Messages:
    8
    Likes Received:
    0
    OK, I see... BTW, is there anybody who knows default username and password to login to dahua sd22204t-gn camera by Telnet? I already tried admin/admin, root/admin, admin/7ujmko0admin. I have this version - 2.400.0000.16.R.T1.484, build : 2016-05-17
     
  3. nayr

    nayr IPCT Contributor

    Joined:
    Jul 16, 2014
    Messages:
    9,347
    Likes Received:
    5,239
    Location:
    Denver, CO
    did you change the default password of admin? It should have forced you to do this on first login. Dahua Enable Telnet

    Though on more recent firmware they have been disabling telnet all-together because of the botnet threats..
     
  4. AlexV

    AlexV n3wb

    Joined:
    Jan 20, 2017
    Messages:
    8
    Likes Received:
    0
    It tried to force me to change but I've declined and left the default admin/admin. The Telnet was enabled by default on my camera but I fail to find actual login info.
     
  5. nayr

    nayr IPCT Contributor

    Joined:
    Jul 16, 2014
    Messages:
    9,347
    Likes Received:
    5,239
    Location:
    Denver, CO
    try changing the password; I could see it blocking telnet access w/default credentials to try to mitigate botnet attacks
     
  6. AlexV

    AlexV n3wb

    Joined:
    Jan 20, 2017
    Messages:
    8
    Likes Received:
    0
    I've tried right now, didn't work even after password change. admin/[new password], admin/7ujmko0[new password] - all fail.
     
  7. uronito

    uronito n3wb

    Joined:
    Oct 19, 2016
    Messages:
    7
    Likes Received:
    0
    Hi Nayr,

    had could try autenthication with te latest firmware.

    Thanks!!!
     
  8. Go3Team

    Go3Team Pulling my weight

    Joined:
    Mar 13, 2017
    Messages:
    147
    Likes Received:
    109
    Location:
    RVA
    Any idea how I can get a url upon motion activation?

    if (code === 'VideoMotion' && action === 'Start') (http://urltoturnlightson)
    Thanks.
     
  9. Roman Gaufman

    Roman Gaufman n3wb

    Joined:
    Mar 22, 2017
    Messages:
    9
    Likes Received:
    2
    What about things like TripWire, Missing Object, Facial Detection, etc? - it seems Dahua cameras do not report this as Onvif Events so I'm looking for an alternative method to access this information :)
     
  10. Mufasa

    Mufasa Young grasshopper

    Joined:
    Jan 24, 2017
    Messages:
    33
    Likes Received:
    10
    Hi Nayr,

    Thanks for the node module!

    It seems like now the IP Camera is using Digest auth, and the node module only deals with basic auth.

    Was there a plan to address the digest auth? Or was there some other way to force the basic auth?

    TIA!
     
  11. cor35vet

    cor35vet Pulling my weight

    Joined:
    Jun 23, 2016
    Messages:
    337
    Likes Received:
    205
    uronito and aristobrat like this.
  12. trollmar

    trollmar n3wb

    Joined:
    Feb 9, 2017
    Messages:
    20
    Likes Received:
    0
    Hi,

    Maybe a stupid question
    i would like to use your node.js in node-red ..it this possible?
    thx for a little hint
     
  13. uronito

    uronito n3wb

    Joined:
    Oct 19, 2016
    Messages:
    7
    Likes Received:
    0
    hi @cor35vet ,

    Can you implement digest authentication in node module of nayr for newer firmware of dahua?

    Thanks.
     
  14. cor35vet

    cor35vet Pulling my weight

    Joined:
    Jun 23, 2016
    Messages:
    337
    Likes Received:
    205
    Sorry, I don't do javascript.
     
  15. uronito

    uronito n3wb

    Joined:
    Oct 19, 2016
    Messages:
    7
    Likes Received:
    0
  16. uronito

    uronito n3wb

    Joined:
    Oct 19, 2016
    Messages:
    7
    Likes Received:
    0
    Hi Nayr,

    Can you add digest authentication to your node-dahua-api library for nodejs.

    Te library only contains basic auth, and newer firmwares from dahua forces to digest auth.

    I try make digest auth in the part of lybrary net.connect to eventmanager but i dont know it.

    Thanks in advance!!!!!!!!
     
  17. Jignasa Kalsariya

    Jignasa Kalsariya n3wb

    Joined:
    Oct 25, 2017
    Messages:
    2
    Likes Received:
    0
  18. sealfab

    sealfab n3wb

    Joined:
    Feb 24, 2015
    Messages:
    25
    Likes Received:
    0
    Is there a way to determine the data of the oldest recorded video? Either via api or url command?
     
  19. streiten

    streiten n3wb

    Joined:
    May 9, 2018
    Messages:
    1
    Likes Received:
    2
    just forked the module and should work now with digest-auth. also added functions for file search and retrieval
    streiten/node-dahua-api

    tested on IPC-HFW5831E-Z5E with firmware version 2.622.0000000.18.R, Build Date: 2017-11-10
    as the camera has no PTZ those functions are not tested
     
    raymondkoppen and aristobrat like this.
  20. raymondkoppen

    raymondkoppen n3wb

    Joined:
    Sep 12, 2017
    Messages:
    13
    Likes Received:
    9
    Thanks for this, I'm going to try to get this working again in combination with Domoticz.

    How are you using this @streiten if I may ask ?