Closed Asher978 closed 3 years ago
Hi @Asher978 - what ports are you forwarding?
Just as a side note, port-forwarding IP cameras is quite a dangerous thing to do. Many many cameras end up getting hacked and used in botnets - so be careful!
@chriswiggins Yes, security is controlled via IP Whitelisting and only allowing certain IPs to get though the network. This is all implemented at the firewall for the External Network.
Since the port forwarding on the network allows to get a connection to the camera, how can I instantiate a new instance of new Cam()
Just use the IP address of the external router IP? That should work if port 80 is opened correctly
Diff issue now? Actually two Issues.
camera
Dahua IP Fixed Dome Cam
const config = {
hostname: "XXX.XXX.XXX.XXX",
username: "XXXXX",
password: "XXXXX",
port: "8001",
path: "/onvif/device_service",
}
new Cam(config, err => {
if(err) {
console.error(":: CAM Init ERROR :::", err)
// ^^^ i get Cannot read property `width` of undefined
}
})
camera
Avigilon Intercom Cam
All works here. However the rtsp uri returns the local IP. I am guessing this is expected and I would have to substitute the local IP to the site's public IP myself?
The dahua camera might be returning some weird responses that we need to consider. Can you print the raw XML output? The new cam callback can take a third parameter xml to debug that
On the 2nd camera, yes that is correct the camera will return its internal IP as it doesn't know about the NAT
(err, data, xml) => {
if (err) {
// i dont have access to xml here. ONLY error. Did i miss something?
}
},
Getting the same issue. Looks like some Onvif cameras don't return resolution or rate control information in the initial call, especially newer ones. Same issue seen on the node-onvif library. Need to allow for empty set and getting that information from other calls.
Closing this - if you'd like this to be fixed we'd love you to send in a PR. Thanks!
what is the best way to provide the External IP for the site where the cam is located. I have set port forwarding on that site allowing a direct connection to the camera once i hit that port.
new CAM ({ HOSTNAME: // i have tried the external ip but no luck })
Is there a diff method or way to instantiate this class with an external IP?