Supergiovane / node-red-contrib-hikvision-ultimate

A native set of node for Hikvision Cameras, Doorbells, Alarms, Radars etc.
https://www.facebook.com/supergiovaneDev
MIT License
51 stars 11 forks source link

Picture Node: Network timeout #2

Closed GeorgWolter closed 3 years ago

GeorgWolter commented 3 years ago

First of all I would like to say thank you and best from Germany👍

My cameras are abroad so I am using a VPN which works fine with http-access to cameras via Firefox and iVMS-4200. Current issue: The picture node's attempt to connect to a camera leads to a timeout.

topic: "" errorDescription: "network timeout at: http://192.xxx.xxx.xxx/ISAPI/Streaming/channels/101/picture" payload: true

Supergiovane commented 3 years ago

Hello, I think i should increase the timeout. I’ll do it sofort, so you can try.

Supergiovane commented 3 years ago

V 1.0.6 is out. The timeout is now 15 seconds. It should suffice. Let me know. Thanks.

GeorgWolter commented 3 years ago

Great, that's performance👏 Just waiting that Nod Red is offering the V 1.0.6 in menu "Palette".

GeorgWolter commented 3 years ago

V 1.0.6 installed but it's still saying timeout. Anything I should configure in the camera maybe? I guess the node will work even via VPN. Cameras I have: DS-2CD2T63G0-I8 AND DS-2CD2T85FWD-I8

Bildschirmfoto 2020-12-13 um 20 16 33

Supergiovane commented 3 years ago

Hmmmm... 15 seconds should be enough. The heartbeat fails as well some seconds later. What appens if you copy the URL of the first debug message, pasting it into web browser?

Supergiovane commented 3 years ago

And... can you issue a node -v command in a node-red console and tell me if you’ve at least Node v10.0.0 installed?

Supergiovane commented 3 years ago

30A34EC3-E0DA-4593-92BE-FA173F276D3A Other than that, have you enabled the Isapi/CGI option in the camera?

GeorgWolter commented 3 years ago
Supergiovane commented 3 years ago

There is only the CGI thing. Can you check it? And.. how many seconds passes between the calling of URL and the image shown?

GeorgWolter commented 3 years ago
Supergiovane commented 3 years ago

After installing the v1.0.6 have you restarted nodered? If yes, how about changing the authetication from “digest” to “basic” in the config node and restart node-red?

GeorgWolter commented 3 years ago
Supergiovane commented 3 years ago

Tried yet with my VPN and all is fine.

Item-0_e_WiFi_e_Item-0
GeorgWolter commented 3 years ago

Strange 😊 I am running Node Red on a Raspberry Pi in my home network And I have another instance running on DS720+ VMM (see issue #2)

Supergiovane commented 3 years ago

Do you maybe have WIFI and Ethernet both active on your PI? You could disable the WIFI to see if it fixes the issue.

GeorgWolter commented 3 years ago

Pi: I am using a LAN / PoE-Hat. WiFi is not active.

ip -a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff inet 192.168.178.28/24 brd 192.168.178.255 scope global dynamic noprefixroute eth0 valid_lft 863159sec preferred_lft 755159sec inet6 fe80::xxxx:491c:xxxx:be4e/64 scope link valid_lft forever preferred_lft forever 3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether b8:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Supergiovane commented 3 years ago

Ok, let me do some more checks tomorrow, once in office. I'll try to ditch into this issue. It's for sure related to some other timeout... I'll keep you posted.

GeorgWolter commented 3 years ago

👏 Thanks

Supergiovane commented 3 years ago

PS: in the meantime, revert to digest authentication ;-) Last but not least... have you tried calling the URL directly from a browser on Raspberry?

GeorgWolter commented 3 years ago

Raspberry / Browser: Not yet tested My 3rd test-environment: DS-720+ with Node Red running in Docker: Node Installation works fine but no connection to cams.

Supergiovane commented 3 years ago

Hi Georg. Is nodered on docker able to reach the internet or you vpn? You should be sure thath the Raspi and nodered on synologi are able to reach other end of your vpn.

Supergiovane commented 3 years ago

Hi Georg. Is nodered on docker able to reach the internet or you vpn? You should be sure that the Raspi and nodered on synologi are able to reach the other end of your vpn where your cams resides.

GeorgWolter commented 3 years ago

Will verify that until tomorrow and I think you are completely right. And in the next week I will get a camera to my place here. Then no need for VPN anymore😅

Supergiovane commented 3 years ago

Georg?

GeorgWolter commented 3 years ago

Hi, have thought through the infrastructure and realised that the problem lies here. Certainly not in your software. Working on establishing a VPN Site-to-Site connection from my Fritz!Box in Germany to my remote site abroad (UniFi USG).

Supergiovane commented 3 years ago

Good luck. I ended up using opnSense on both ends to do a reliable openvpn connection. I had the same as you, fritzbox and usg.

GeorgWolter commented 3 years ago

Yes, I am facing the same trouble. I am close to saying good bye to my FB6590 and buy a Dream Machine Pro for Bremen. How does your VPN infra (HW) look like?

Supergiovane commented 3 years ago

Hi Georg, I have a star configuration. Due to the fact that my internet connection at home doesn't have a fixed IP, i bought a cloud subscription from Hetzner.com (or .de, i cannot recall now) for ca. Euro 3,00/Month with fixed IP. I've installed an opnSense firewall on this machine. OpnSense has OpenVPN client/Server built in. This machine works as OpenVPN Server. Then for my home, i've installed a VM on my QNAP, with opnSense as firewall, having openVPN client connected to the Hetzner openVPN server's cloud machine. This give me a fixed IP for my home. My primary firewall is obviously the opnSense on the Hetzner cloud machine (because it "sees" my home's internal IP subnet, that is routable as well!). At home of the mather of my wife, i installed a super very good Telkonika router (it has two SIM slots and it can connect to a WAN as well , working as OpenVPN client: https://teltonika-networks.com/it/product/rutx11/). This Teltonika router is connected to a Fritzbox (working only as modem for a landline internet connection and a DECT server for phones in her house). This teltonika router connects with the Hetzner cloud machine as well, so from my home, i'm able to connect to the entire subnet of my wife's mother's home. My only Unifi gears are switches and Access Points. Unifi routers are way so limited for my needs.

GeorgWolter commented 3 years ago

Thanks for the detailed description👍

GeorgWolter commented 3 years ago

Hi Giovane, i see that the launch of REOLINK's new 4K RLC-810A and 510A is ongoing. Both got person and vehicle detection.

An interesting test on YT: https://www.youtube.com/watch?v=fxpxuv5Cmd0

Do you think you can develop nodes...?

Supergiovane commented 3 years ago

Hi Georg, nope sorry. I develop only for gears i own. I own only hikvision stuffs!

GeorgWolter commented 3 years ago

I See. Otherwise I would maybe send you a Reolink.

GeorgWolter commented 3 years ago

Giovane, buon Natale! Just thought I'll let you know that I will get a DS-2CD2645FWD-IZS very soon. So if you think that some testing would be from benefit for your projects then very welcome.

Supergiovane commented 3 years ago

Hi Georg Wow, good! I’m sure they work flawlessy with hikvision-ultimate!

GeorgWolter commented 3 years ago

I'm very sure of that too👍

GeorgWolter commented 3 years ago

DS-2CD2645FWD-IZS is working well. Should come up now in the compatibility list.

Supergiovane commented 3 years ago

Thank you. If you click “connect” in the config window, it will be automatically added here www.supergiovane.it:8080/?read=true&md=noCD&fw=no