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