PTZ with onvif

Forum for questions and support relating to the 1.30.x releases only.
jedi
Posts: 1
Joined: Tue Apr 21, 2020 4:27 pm

Re: PTZ with onvif

Post by jedi »

I had problems setting up PTZ control onvif camera purchased on Ali. Onvif view was fine without problems, however ptz control did not work.
Camera: IPD-E3CY02-BS

And I want to share a solution so that it can be of help to others.
The solution turned out to be quite simple and it does not require to script changes:
Control type: Netcat ONVIF
Control device: SubStream <--or MainStream is worked too
Control address: admin:adminpass@192.168.1.111:8999/onvif/ptz_service
After changing, a zoneminder reboot is required

...:8999/onvif/ptz_service - I learned this address using the packet sniffer from "Onvif Device Manager"

Have а nice day
jeremyenos
Posts: 10
Joined: Sat Apr 04, 2020 2:01 am

Re: PTZ with onvif

Post by jeremyenos »

> After changing, a zoneminder reboot is required
^^^^^^

A quite critical detail I burned a lot of time overlooking! thx.
jeremyenos
Posts: 10
Joined: Sat Apr 04, 2020 2:01 am

Re: PTZ with onvif

Post by jeremyenos »

Ok- I found 2 issues and got it to work.
1) I wasn't restarting the docker instance- apparently that netcat.pm is read in only at start time! Doh.
2) I looked in the ONVIF documentation, and it mentioned that to do a stop, just send the same command for movement with a x and y both set to 0 instead of a number. That worked for the autostop and stop sequences as far as I can tell.

Now, if only I could get presets to work. (and be limited to just a few- displaying 64 preset options in ZMNinja gets a little obnoxious.
ronw
Posts: 4
Joined: Wed Apr 22, 2020 7:06 pm

Re: PTZ with onvif

Post by ronw »

Jeremy, How did you implement the 0,0 command? I have the same issue and am struggling with it.
kysdaddy
Posts: 14
Joined: Sat Jul 11, 2020 10:50 pm

Re: PTZ with onvif

Post by kysdaddy »

Hello,
Did you ever get this figured out? I am having identical issues
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: PTZ with onvif

Post by thefuzz4 »

Did anyone figure out getting presets to work?
jeremyenos
Posts: 10
Joined: Sat Apr 04, 2020 2:01 am

Re: PTZ with onvif

Post by jeremyenos »

Much apologies to neglected questions- somehow I missed any notification of them.
I've re-installed since, and I'm now using version 1.34.22 (I forgot the previous version, but it was older). Anyway, I set an auto stop timeout = 1, put the control address in as before, and this time it worked. At least w/ my newer S3VC camera. (my older ones were fried by lightning)

I'll repost the following question in the appropriate version branch, but since it's related, figured I'd mention here as well.
I'm now experimenting and failing with a different Chinese brand camera that seems crazy obscure... Tyvance? It looks just like YoLuke, but it's a little better featured, the firmware is slightly better, and app is slightly different. But I have had zero success getting PTZ to work at all with Zoneminder.

btw- I run dlandon's Zoneminder docker image, if it matters. But with the previous Zoneminder version and this one, I have never had the "Probe ONVIF" function detect any cameras. I have no idea why, but I feel like that is where I should be focusing my efforts. I have already tried putting in the URL that I discovered with ONVIF DM and a wireshark sniffer. No luck there either.

ONVIF Device Manager, Tinycam, etc... all seem to detect these cameras effortlessly and PTZ works w/o issue. I wish Zoneminder worked as well. I can't seem to find a starting point to even debug it. The command line tool returns nothing either.
So here I am in the forum again.
LeoTLT
Posts: 1
Joined: Wed Mar 17, 2021 9:17 am
Location: Togliatty

Re: PTZ with onvif

Post by LeoTLT »

Greetings to all! Guys, help start a PTZ on such a camera. I can't do it.

UPD:

Immediately I apologize for my English - this is all google translator.)) (You have the latest version of ZoneMinder installed, v1.34.23) - my server. Cameras in the production of automatic doors. There are almost 100 of them in the installation.
I managed to get this PTZ camera in the following steps. Hope it comes in handy for someone here!
I only fixed this parameter in the original Netcat.pm file:

I had - my $ cmd = 'onvif / PTZ';
Fixed on - my $ cmd = 'onvif / ptz_service';

And control settings as in the screenshot that I attached.
Thanks to all! Because I took all the ideas from this topic.
Everything works in both ZM and ZMninjapro.
Attachments
And control settings as in the screenshot that I attached
And control settings as in the screenshot that I attached
2021-03-17 20-46-28.png (58.5 KiB) Viewed 42200 times
remmina_AdorSkud_192.168.0.42_2021317-93245.png
remmina_AdorSkud_192.168.0.42_2021317-93245.png (267.84 KiB) Viewed 42222 times
I invite everyone to the group https://t.me/zoneminder for joint discussion, help and exchange of experience.
L4UR3NS
Posts: 1
Joined: Mon Apr 19, 2021 11:40 pm

Re: PTZ with onvif

Post by L4UR3NS »

Hi all.

I was having some trouble getting PTZ to work but since I managed to pull it off I thought I'd share my findings.

The camera's I have a 25 EUR chinese cams (see attachment).

Using the default Netcat.pm file with the following settings:

Control Type: Netcat ONVIF
Control Device: Profile_1
Control Address: admin:12345@IPADDRESS:80/onvif/ptz_service
Auto Stop Timeout: 0,10

Hope this will help someone.
Attachments
Knipsel.PNG
Knipsel.PNG (108.57 KiB) Viewed 40876 times
hornetster
Posts: 15
Joined: Mon Nov 01, 2010 10:00 am
Location: Redlands, Oz

Re: PTZ with onvif

Post by hornetster »

Yes!
Thanks to all the genii here.
I have an el cheapo SriCam SP012, and have been battling with this for a while, but have just succeeded!
Settings are:
Control Type: Netcat ONVIF
Control Device: Profile_1
Control Address: admin:12345@IPADDRESS:5000/onvif/ptz_service
Auto Stop Timeout: 0,10

Brilliant!
OpensuseTumbleweed/PLASMA
Ubuntu22.04
ZoneminderV1.36.33
dougmccrary
Posts: 1150
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: PTZ with onvif

Post by dougmccrary »

In v1.36 on a sp005 this works for me, albeit with errors:

Control Type Netcat ONVIF
Control Device
Control Address admin:12345@192.168.1.207:5000
Auto Stop Timeout (empty, only takes a single numeric.)

Reboot/restart don't seem to be required with this version, either.
GoDie
Posts: 5
Joined: Sat Nov 14, 2020 2:37 pm

Re: PTZ with onvif

Post by GoDie »

Got one chinese working with:
Control device: 000
Control address 192.168.1.109:8899
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: PTZ with onvif

Post by thefuzz4 »

JLerch Tampa wrote: Mon Jun 03, 2019 6:47 pm Just a quick 1st Post to say Thank You! This thread helped me figure out how to get PTZ working in ZM with my new el-cheapo POE Camera.

Image

Image

I've been using a Reolink NVR (RLN8-410) with 6 of their RLC-410 IP Cameras, and for the most part it was ok. However it refuses to support any 3rd party cameras so it was time to build my own NVR. I went with ZoneMinder as I couldn't stomach the thought of running iSpy on Windows. :)

Still have a bunch of learning to do, but just wanted to say thank you!

Kind Regards,
James in Tampa,FL,USA,Earth
James thank you so much for posting this, I also bought one of these PTZ cameras and your screenshots have allowed me to find my sanity once again. Thank you.
wodkalime
Posts: 1
Joined: Mon Jan 31, 2022 4:46 pm

Re: PTZ with onvif

Post by wodkalime »

For those of you, who were not successfull (like me)..

Here is an updated onvif.pm and the settings I used... Took me 2 days of sniffing :(

MainStream has to be written with a big S!!! :roll:

Best luck for you guys...

Main changes in onvif I did - fixed the datetime function slightly and added/changed URI /onvif/ptz_service

replace your onvif.pm in /usr/share/perl5/ZoneMinder/Control/ with this one, and it should work....
Attachments
onvif.ptz.png
onvif.ptz.png (43.15 KiB) Viewed 30047 times
onvif.pm.txt
(24.75 KiB) Downloaded 221 times
Locked