+43
Started

Onvif-protocol for easy setup of IP-camera’s

Theo Derks - NL (distributor) 6 jaar geleden in Products / Other drivers bijgewerkt door Dennis Piet 3 dag geleden 23
Installers that are working in security-industry are asking us: is it possible to implement the Onvif-protocol for easy setup of IP-camera’s etc?

Please see www.onvif.org (http://www.onvif.org)

Is this module still in working condition?

I cannot get it to work with any of my customer's ONVIF cameras.

Scanning for ONVIF cameras in my network gives no results, even though I have 5 of them. All of them are found with ODM.

Also scanning would only work within your own network, not for adding cameras that reside elsewhere on the internet. I think there should be an option to manually add camera's, by inputting the address.

When I manually add one of the cameras in the code to temp_data_json (line 4 of GUImain), I only get:

SCRIPT Script exception: TypeError: C:\Users\Dennis\AppData\Roaming\iRidium Mobile\iRidiumStudio\iRidium pro documents\Studio\Temp\project88565921\scripts\GUICam.js:28: Tried to use undefined as an object

I have also tested this module in i3 Lite, but there also the scanner does not find any camera's.

It would be nice to have an example project of how to use this module in your own project, without the scanner / GUI / option settings.   The videostream I can get with the normal rtsp in project cameras, but I need to add PTZ control to that.

Thanks for the quick response Vladimir.  I just tried your version.

This seems a little bit better. Now my manually added ONVIF-camera shows up in the GUI, but it now gives an "Authorization fail..." and a iR_Loading animation.

In the logfile: SCRIPT Script exception: TypeError: C:\Users\Dennis\AppData\Roaming\iRidium Mobile\iRidiumStudio\iRidium pro documents\Studio\Temp\project9454765\scripts\UNITOnvifCam.js:456: Tried to use undefined as an object

Should I start a new topic to get some attention, or can we continue in this 6 year old topic ?

Hello.

Tell us the ONVIF firmware version.

You can install a third-party client for ONVIF and see if it works there.

One camera has Onvif 2.4, another has 2.21


As I wrote you 2 weeks ago:  All of them are found and work with ODM (= Onvif Device Manager), the same as the link you give above.

It is not an explanation of the error in UNITOnvifCam.js:456

Example of one camera:

Hello.

1. Try adding the camera via the scanner and check if the error persists.
2. Tell us the i3 pro version.

1. I told you the scanner does not work.

"Scanning for ONVIF cameras in my network gives no results, even though I have 5 of them. All of them are found with ODM.

Also scanning would only work within your own network, not for adding cameras that reside elsewhere on the internet. I think there should be an option to manually add camera's, by inputting the address."

2. I always have the latest Iridium release

iRidium Environment: 1.3.25.0.23568

iRidium Studio: 2.0.15.23568 (64 bit)
Transfer: 1.1.3.14538 (32 bit)
iRidium: 1.3.25.23568 (64 bit)
Server: 1.3.25.23568 (32 bit)

iRidium lite: 1.3.13.19979 (32 bit)
Server lite: 1.3.13.19979 (32 bit)

Hi Vladimir, I did some more debugging, dumping the XML responses to IR.Log and found the camera I'm testing with uses 

NS.S="env", NS.D="env". So I got it to work manually. But I guess those parameters are different for many camera's.

So now, I'm trying to figure out how to use this module, without the scanner that does not work. Also in my project the GUI from the module would not be used.

I think there should be an option to manually add camera's, by inputting the address.

Normally all you need is the IP-adres, port, login and password.  Functions in the ONVIF module should handle everything else.

Can you please make sure that comments in Modules are in English instead of Russian? Having to use Google translate all the time during figuring out how this works, does not really help.

Thank you for your helpful suggestions. We will take them into account, because we plan to create a native ONVIF driver.


For the scripting module is: does the web interface of your camera?

What do you mean by "does the web interface of your camera?"

We mean, is it possible to view the video of this camera via the web interface? If available, then give us AnyDesk (create a separate ticket, in which you specify the access details).

Now that I got my test-camera working, I tried connecting to my clients PTZ cameras.

I already found out they use NS.S="SOAP-ENV", so I can manually add them.

I run into the next problem:  GetSystemDateAndTime   is requesting without authentication. Yes, I know the Onvif specs allow for this, BUT many cameras (including the Everfocus and Provision cameras my client has), do not allow unauthenicated.

The author of the working node.js Onvif implementaion writes about this:

/ The ONVIF spec says this should work without a Password as we need to know any difference in the
// remote NVT's time relative to our own time clock (called the timeShift) so we can calculate the
// correct timestamp in nonce authentication header.
// But.. Panasonic and Digital Barriers both have devices that implement ONVIF that only work with
// authenticated getSystemDateAndTime

His solution is:

if (xml && xml.toLowerCase().includes('sender not authorized')) {
// Try again with a Username and Password

I see that Onvif Device Manager uses this same work around. So can we implement this in the Iridium Onvif Module?

I managed to change the ONVIF module a little to get it working with a camera that needs authentication for GetSystemDateAndTime.

First I changed in SOAP Unit:

this.GetSystemDateAndTime = function (in_oAuthData)

{

if (typeof in_oAuthData !== 'undefined')

{

return getAuthWrap(DATA.GetSystemDateAndTime.Data, in_oAuthData);

}

else

{

return getWrap(DATA.GetSystemDateAndTime.Data);

}

};

And then I changed in UNITOnvifCam:

function SyncTime()

{

//GCam.StateLoading(true);

l_oSubDevice.SetFeedback("StateLoading", true);

Send(SOAP.GetSystemDateAndTime(AuthData), SOAP.DATA.GetSystemDateAndTime.Action, syncTimeParse, Service);

l_bServicesError = false;

}

Now I can connect to the PTZ cameras and view their live stream

But: PTZ commands are NOT working :-(

Also : the arrows on the PTZ controls in the Module are wrong.  OK, this is just cosmetic and I can easily fix it myself, but thought you should now and fix it in the official module too.

Hello.

You reported that the camera rotation control does not work. Please specify: have you solved this issue yourself? We have taken the task of controlling the rotation for the module into operation, but the readiness period is still unknown. Do you need help with this part now?

No, I cannot get the PTZ control to work.

I have started logging response messages and see that the camera is complaining about unknown profiletoken "quality_h264".  This seems to be hardcoded in the XMLData unit.  Why ?

I also used Wireshark to compare what Iridium OnvifModule is sending to the camera and what Onvif Device Manager is sending.  The XML differs alot, especially where Iridium is using "tptz:" and "tt:" namespaces, where ODM just omits this.

Yesterday we installed the PTZ-camera at the clients location, so I do not have direct access to it anymore.

Now I use the external address to access the camera. This works fine in ODM, but the Iridium Onvif Module shows no image. I guess this is because the module uses the adres reported by the camera as the RTSP stream ?

Started

Hello.

We re-started the project with ONVIF. We will report the result within a month.

That is good news! Ofcourse a native onvif-driver that works just like other Iridium drivers is the best.

In the meantime I will give it a go to try and fix the current javascripts to make PTZ work.  We just installed the PTZ-camera at the clients location, so now he is getting a little bit impatient to play with his new toy on his control-screen.

Hello.

In the meantime I will give it a go to try and fix the current javascripts to make PTZ work. We just installed the PTZ-camera at the clients location, so now he is getting a little bit impatient to play with his new toy on his control-screen.

Update the i3 pro client. How does PTZ work in ODM? That is, whether you can control the camera rotation or zoom. If it works, can you provide a camera with PTZ for some time for edits, so that you can already navigate by it? Or simply provide access, and we will do everything necessary.

Hello, Dennis.

Is your question relevant?

Update the i3 pro client. How does PTZ work in ODM? That is, whether you can control the camera rotation or zoom. If it works, can you provide a camera with PTZ for some time for edits, so that you can already navigate by it? Or simply provide access, and we will do everything necessary.

Yes, it still is relevant.   2 clients want to control their PTZ camera from their Iridium based security panels.

I have asked them if I can give you access, but they are bound by their privacy-contracts and therefore cannot give access to third parties.

I myself have access to the cameras via VPN, so if you want me to test something I can do it.

Both cameras are working fine in ODM.


They also work with the node.js ONVIF library (https://github.com/agsh/onvif), so I think that implementation could be a good startingpoint for the Iridium implementation.