When I use the getDeviceInformation() function with credentials it works fine, but when the credentials aren't provides it gives this error:
Error: ONVIF SOAP Fault: Sender not authorizedThe action requested requires authorization and the sender is not authorized.
My code:
onvif.Discovery.on('device', function (cam, remoteInfo) {
//cam.username = "admin";
//cam.password = "password";
cam.getDeviceInformation(function (err, info, xml) {
if (err) console.log(err);
else console.log(info);
});
})
onvif.Discovery.probe();
Is this because of my camera or am I missing something?