eu-evops / homebridge-hikvision

28 stars 21 forks source link

Node:1790 Error #24

Open Samington33 opened 3 years ago

Samington33 commented 3 years ago

Hi Everyone,

I’m experiencing the above error with the Hikvision Homebridge plugin, and the cameras are not appearing in the Home app.

The NVR host IP and login credentials in my config.jsom are correct; I can verify this by logging into the NVR directly through a web browser.

From reading through other issues, I’m guessing that this has something to do with my cameras being analog, not IP. But I thought I’d ask here in case anyone has any other advice.

Excerpt from my Homebridge log below.

[09/03/2021, 15:35:54] [Hikvision] Connected to NVR system: { DeviceInfo: { '$': { version: '1.0', xmlns: 'http://www.hikvision.com/ver20/XMLSchema' }, deviceName: 'Embedded Net DVR', deviceID:’ ‘(Deleted)’, model: 'DS-7204HUHI-K1', serialNumber: ‘’(Deleted)’, macAddress: ‘’(Deleted)’, firmwareVersion: 'V4.21.000', firmwareReleasedDate: 'build 190722', encoderVersion: 'V5.0', encoderReleasedDate: 'build 190716', deviceType: 'IPC', telecontrolID: '255', hardwareVersion: '0xc0e3500' } } [09/03/2021, 15:35:54] [Hikvision] Loading cameras... (node:1790) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined at HikvisionApi. (/usr/local/lib/node_modules/@evops/homebridge-hikvision/src/HikvisionApi.ts:60:74) at Generator.next () at fulfilled (/usr/local/lib/node_modules/@evops/homebridge-hikvision/dist/HikvisionApi.js:24:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:1790) 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: 4) (node:1790) [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. MIoT Device (did: 335059420) is now connected

Really appreciate any advice which anyone can offer.

Cheers.

jrelax commented 3 years ago

I also have this issue. I think it has to do with the new version of homebridge using a new version of node

/homebridge # homebridge --version
Initializing HAP-NodeJS v0.9.4...
1.3.4
/homebridge # node --version
v14.16.0
/homebridge #
xfishernet commented 2 years ago

I also have this issue.