ONVIF Probing for ZoneMinder
ONVIF Plug’n’Play
I used the ONVIF API I had assembled to build an automatic configurator for ONVIF cameras in ZoneMinder.
Essentially I put the files from my zm-onvif
poject in a folder onvif
in my local copy of the ZoneMinder sources. I then added some files to integrate both parts. The most complex task for me was to understand the ZoneMinder architecture.
I have not had the time to upload the code, yet. I uploaded the code and made a pull request to include it in ZoneMinder.
Meanwhile I made some screen shots of my local installation:
- Create a new monitor. Most fields are empty. Then click on “ONVIF”.
- The system probes for ONVIF cameras in the local network. And presents them as a list.
- Select a camera and provide the username and password to access it.
- The list shows the existing profiles for the selected camera.
- Select the stream profile and click ‘Save’
- The values from the ONVIF camera have been copied to the monitor definition.
- The most important fields are filled. The camera is operative immediately.
This post is part of The ONVIF series. See the other posts in the series here.
Hi Jan,
I was wondering if you are ever going to upload your files to ZM for Probing the Onvif cams.
Thanks
Hi Dan,
ONVIF support has been merged into ZoneMinder starting version 1.29, but it is off by default.
You have to set –enable-onvif=yes flag in autotools or ZM_ONVIF=ON flag in cmake when compiling.
Thanks Jan for coming back,
I have no idea what you are saying. I’m an old geezer and that’s a little over my head. The code below is what I need for my cam.
HOOTOO HT-IP008HD PTZ Configuration
name: PTZConfigName_000
token: 000
use count: 2
pan tilt limits: (0, 1)
zoom limits: (0, 1)
default ptz speed: (pan=0.5,tilt=0.5,zoom=0.5)
default ptz time timeout: PT10S
default absolute pant tilt position space: http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace
default absolute zoom position space: http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace
default continuous pant tilt velocity space: http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace
default continuous zoom velocity space: http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace
default relative pant tilt translation space: http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace
default relative zoom translation space: http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace
node token: 000
Can any of this be saved to the list as HOOTOO HT-IP008HD PTZ at ZM?
This is an updated version of what you did and I wish I knew more about what you were talking about. I really am sorry…
Thanks again
Dan
How can I set this setting once my instalation is ready and working? Is there any shell command to reconfigure zoneminder setting up this option referenced above?
“–enable-onvif=yes”
If the only way is recompile the code, could you show me steps to recompile?
Hi Rafael,
yes, you have to recompile. I am not aware of any distros shipping zm with onvif enabled.
See the zm wiki (https://wiki.zoneminder.com/Main_Documentation) for all about how to compile from source.
Hi Dan,
my ONVIF extension to ZM does not currently support PTZ. (Mainly because my own cameras don’t.) ZM itself does support PTZ. So there should be a way of saving your camera’s capabilities in the ZM monitor definition. If you want to extend this yourself then you can start with the file web/skins/classic/views/monitor.php in the ZM sources.
Thank you Jan, but I know nothing about coding. The last time I did any coding was around 1982. You probability never heard of the language “Commodore BASIC”. Most likely way before your time.
Example:
10 A = 10
20 PRINT “Hello”
30 A = A + 1
40 IF A < 5 THEN 20
50 END
RUN
Hello
Hello
Hello
Hello
Hello
Not quite the same as today's coding. I'd be no help for anyone including myself, so until someone gets a HOOTOO PTZ and wants to do the coding for it, I'm SOL
Thanks for replying anyway… 🙂
Dan
Nice work. I installed latest zm from ppa and i hit The ONVIF-Button but i get this:
“Unable to probe network cameras, status is ‘2’”
Emil, I added a zm issue for your comment. Please let’s track issues there.
https://github.com/ZoneMinder/ZoneMinder/issues/1345
Hi.
Installed Zm 1.29 from ppa and gott the “ONVIF” link in “add new monitor menu”
http://192.168.1.109/zm/index.php?view=onvifprobe&mid=0
but when pressed i get this:
Unable to probe network cameras, status is ‘2’
You can see more detail if you run `zmonvif-probe.pl -v probe` from the command line. From the error messages you should be able to tell what went wrong.
I ran into the same issue (on Ubuntu Server 15.10), and partially solved it by installing the following packages:
libclass-std-fast-perl
libdata-dump-perl
libsoap-wsdl-perl
libdigest-sha-perl
libdigest-perl
libio-socket-multicast-perl
In addition, ‘/usr/share/perl5/WSSecurity/SecuritySerializer.pm’ must be edited to use the ‘SHA’ package instead of ‘SHA1’ (since Ubuntu doesn’t have a SHA1 perl module as of at least 12.04).
However, I now run into a different issue. The ONVIF probing window opens and displays properly, but none of my cameras are discovered. Running ‘zmonvif-probe.pl -v probe’ in terminal gives me the following output: http://pastebin.com/v84mkF5X
Any ideas? Is this an issue with the cameras? Becasue ONVIF Device Manager finds all 50+ of my cameras, and only a few of them don’t load properly.
Danie, I added a zm issue for your comment. Please let’s track issues there.
https://github.com/ZoneMinder/ZoneMinder/issues/1345 and
https://github.com/ZoneMinder/ZoneMinder/issues/1346
Maybe you could add your camera’s make and model to the issue.
Thanks, I added a comment with the camera’s info in the issue that was still open.