Axis 215 PTZ - problem controlling camera (Axis API v2)

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by agony »

Hi,
i'm running ZoneMinder v1.36.11 on AlmaLinux and i've got a problem trying to control the camera in the topic.
Feed works ok with Ffmpeg and rtsp: protocol, but when i try to move the camera nothing happens and i get an error.
Configuration as follow:
Controllable: Checked
Control Type: Axis API v2
Control Address: user:password@x.x.x.x

running a tcpdump gives the following error:

Code: Select all

GET //axis-cgi/com/ptz.cgi?rpan=65 HTTP/1.1
g+2"..X.GET //axis-cgi/com/ptz.cgi?rpan=65 HTTP/1.1
        Your client does not have permission to get URL /axis-cgi/com/ptz.cgi from this server.
Your client does not have permission to get URL /axis-cgi/com/ptz.cgi from this server.
issuing the command:

Code: Select all

 user:password@x.x.x.x//axis-cgi/com/ptz.cgi?rpan=65
moves the camera with no error:

Code: Select all

GET //axis-cgi/com/ptz.cgi?rpan=65 HTTP/1.1
g,h...w.GET //axis-cgi/com/ptz.cgi?rpan=65 HTTP/1.1
any toughts?

Thanks.
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by alabamatoy »

May need to TS the code in Axis API v2. Its in file "AxisV2.pm" under /usr/share/perl5/ZoneMinder/Control on my Ubuntu.

Turn on debug*, restart ZM, open live view and poke at PTZ, stop debug, restart ZM, and look at logs. It should show you what's happening in detail. Post up here and we will try to assist.

If you find a problem in the control script (AxisV2.pm) please post an issue in Git so we can get it fixed for everyone in subsequent release.

* - options, logging, set:

LOG_DEBUG: checked

LOG_DEBUG_TARGET: _zmcontrol_[monitorID of camera to be PTZed] as in _zmcontrol_5

LOG_DEBUG_LEVEL: 9

Uncheck log_debug and restart after testing or you will clobber your server with voluminous logs


HTH
User avatar
iconnor
Posts: 2943
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by iconnor »

So yeah I have some Axis 215's. So I checked to see if PTZ still works. It doesn't.

I have fixed it in master, and the fix will be in 1.36.13. In the meantime you can grab the AxisV2.pm from master and drop it in place.

https://github.com/ZoneMinder/zoneminde ... /AxisV2.pm

In addition, this new version does not require you to populate ControlAddress. It will pull the required info from the Path on the Source tab.
owensr
Posts: 2
Joined: Tue Dec 14, 2021 5:28 pm

Re: Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by owensr »

Posting on this topic as sounds like the poster can answer my question!

I just upgrade from 1.32 (I think) to 1.36.12 and having issues with getting images from 2 Axis 215 PTZ cameras!

They were working fine on 1.32 so guessing the config has not come across correctly?

I have:
Protocol: RTSP
Method: RTP/RTSP
Hostname: user:password@ip.address
Port: 554
Path: /mpeg4/media.amp
Target colorspace: 32 bit colour
Capture Resolution: 704 / 576 / 704x576 D1 PAL
Preseve Aspect Ratio: unticked
Orientation: Normal
Deinterlacing: Disabled
Use RTSP Response Medai URL: unticked.
owensr
Posts: 2
Joined: Tue Dec 14, 2021 5:28 pm

Re: Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by owensr »

OK - found a solution:

Protocol: HTTP
Method: Simple
Hostname: user:password@ip.address
Port: 80
Path /mjpg/video.mjpg


But is this the best/most efficient?

Also bit odd old config has stopped working on this new release?
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

Re: Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by agony »

iconnor wrote: Tue Dec 14, 2021 3:07 pm So yeah I have some Axis 215's. So I checked to see if PTZ still works. It doesn't.
I have fixed it in master, and the fix will be in 1.36.13. In the meantime you can grab the AxisV2.pm from master and drop it in place.
Thanks, now it seems to work without any problem, i'll let you know if something arises from the people using the cameras.
agony
Posts: 7
Joined: Tue Dec 14, 2021 10:00 am

Re: Axis 215 PTZ - problem controlling camera (Axis API v2)

Post by agony »

owensr wrote: Tue Dec 14, 2021 5:56 pm But is this the best/most efficient?
Also bit odd old config has stopped working on this new release?
I use:

Source Type: Ffmpeg
Source Path: rtsp://user:password@IP/mpeg4/media.amp
Method: TCP
Post Reply