eu-evops / homebridge-hikvision

28 stars 21 forks source link

Can you help me? #4

Open janky69 opened 3 years ago

janky69 commented 3 years ago

[10/29/2020, 9:51:12 PM] [Hikvision] [Branka] Stopped video stream. (node:4692) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getLocalAddress' of undefined at RTPStreamManagement.generateSetupEndpointResponse (/usr/local/lib/node_modules/hap-nodejs/src/lib/camera/RTPStreamManagement.ts:1012:27) at /usr/local/lib/node_modules/hap-nodejs/src/lib/camera/RTPStreamManagement.ts:969:16 at /usr/local/lib/node_modules/hap-nodejs/src/lib/util/once.ts:10:18 at StreamingDelegate.prepareStream (/usr/local/lib/node_modules/homebridge-camera-ffmpeg/src/streamingDelegate.ts:276:5) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:4692) 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: 14)

kravena commented 3 years ago

I'm getting this exact same issue, it seems it may be caused by the cameras using the POE ports on the NVR, which means the cameras are exposed via port translation from the NVR to your web browser.

Seems Evops may have his cameras connected via a switch outside of the NVR, hence his IP's are directly visible to the Homebridge-Hikvision plugin.

As such the RTSP ports for the cameras cannot be accessed directly, and only via the NVR. A change would be required to connect via RTSP to the NVR and to select the appropriate channel instead of connecting to the cameras directly.

Can someone confirm this ?

janky69 commented 3 years ago

Hi, thank you for answer!

No, i cannot confirm that. My cameras are connected to switch outside NVR and are accessible with browser from computer.

sponte commented 3 years ago

Hi, firstly apologies for not responding earlier, but all github emails were going into my spam folder :(

My setup is NVR with PoE so the only address that I use is the one of the NVR. Haven't tried using Direct IP and not sure if it would work (sounds like it doesn't). @janky69 have you not got NVR?

tstordyallison commented 3 years ago

Strange - I got the same error as the above and it was really because the plugin was importing the hap-nodejs code directly. #10 is open as a fix now.

AKAIK, this plugin always gets its RTSP stream via the NVR, so as long as the NVR has video, it should.