eu-evops / homebridge-hikvision

28 stars 21 forks source link

i get an error, can you help? #21

Open davidjubaan opened 3 years ago

davidjubaan commented 3 years ago

node:13217) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'status' of undefined at AxiosDigest.getWwwAuth (/usr/lib/node_modules/@evops/homebridge-hikvision/node_modules/axios-digest/index.ts:69:13) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:13217) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:13217) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

zozo6015 commented 3 years ago

I get the exact same error message when I try to connect to my DS-7616NI-K2/16P NVR with firmware version V3.4.100build 180626. Any suggestions?

gowthamravichandran commented 2 years ago

I had the same issue, this typically happens when the API call to NVR fails.

In my case, I had to set the homebridge hikvision plugin config to use port 80 instead of 443 to get it working. The example config had 443 in port number.

You can try to debug this by using a rest client like Postman tool. Set the authorization to Digest Auth and put your NVR username and password. Make a GET call to http://<NVR_IP_ADDRESS>:80/ISAPI/ContentMgmt/InputProxy/channels

You should see your camera names and IP addresses in response. If not, you need to get this API working first, before you configure the homebridge plugin.