Axis 233D PTZ control

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Axis 233D PTZ control

Post by IncompleteString » Fri Nov 01, 2019 9:46 pm

I'm trying to get Zoneminder set up to control an Axis 223D PTZ camera. I was able to get the video feed off the camera just fine using RTSP, but I'm unable to get Zoneminder to PTZ control the thing using the Axis API V2 script.

If I open up a terminal on my Zoneminder server and copy commands out of the AxisV2.pm script and send them to my camera using curl, the camera moves.

For example if I send the following using curl from my server the camera moves right

Code: Select all

curl http://root:pass@192.168.0.74/axis-cgi/com/ptz.cgi?move=right
I decided to run a packet capture on the traffic between my Zoneminder server and my Axis 223D to make sure Zoneminder was actually passing the HTTP control commands. I found no HTTP / port 80 in the traffic between the server and camera only RTSP. So I can only assume that for some reason Zoneminder is not actually sending the commands to the camera when I click on the arrows in the monitor feed.

Is there a way to get the PTZ commands from the monitor feed to appear in a log somewhere? when I turned on debug logging for the web log I did not get any PTZ messages.

Screen Shot 2019-11-01 at 10.44.18 AM.png
Screen Shot 2019-11-01 at 10.44.18 AM.png (211.04 KiB) Viewed 625 times
Screen Shot 2019-11-01 at 10.45.00 AM.png
Screen Shot 2019-11-01 at 10.45.00 AM.png (155.07 KiB) Viewed 625 times
Screen Shot 2019-11-01 at 10.44.50 AM.png
Screen Shot 2019-11-01 at 10.44.50 AM.png (177.32 KiB) Viewed 625 times

IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Re: Axis 233D PTZ control

Post by IncompleteString » Sun Nov 03, 2019 12:23 pm

Ive added two more Axis PTZ cams to Zoneminder, the Axis V2 script doesn't work with either of them.

I've seen posts where people were able to use the "web" monitor to allow direct interaction with the cameras PTZ functions. But when I've tried this Zoneminder just changes the monitor type to remote.

Does anyone have ideas?

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

Re: Axis 233D PTZ control

Post by iconnor » Sun Nov 03, 2019 6:32 pm

I took a quick look with an online demo camera... it may be that we need to request control before actually sending the control commands.

IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Re: Axis 233D PTZ control

Post by IncompleteString » Mon Nov 04, 2019 1:38 am

If it was necessary to request control of the camera, I don't think sending the commands to the camera via cURL would work.

Also from the packet capture I ran Zoneminder is not actually sending the commands to the camera. I made sure the Ubuntu UFW was switched off for testing. Other than that I'm not sure how to troubleshoot this.

IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Re: Axis 233D PTZ control

Post by IncompleteString » Fri Nov 08, 2019 6:32 am

anyone?

IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Re: Axis 233D PTZ control

Post by IncompleteString » Tue Dec 10, 2019 4:11 am

So I kind of got this working.

I had to adjust my firewall settings on my router to allow the PTZ commands from the zone minder server to get to the cameras.

I'm able to control the cameras if I use ZMNinja, but not from the webconsole.

So the cameras are controllable via API calls but not via how ever the web console controls the cameras.

Does anyone have ideas on this?

Also what permissions should /usr/share/perl5/ZoneMinder/Control have?

I did a chmod 777 and chown -R www-data:www-data on that folder for testing

IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Re: Axis 233D PTZ control

Post by IncompleteString » Tue Dec 10, 2019 8:41 am

So when I open up the console on my browser and click on one of the PTZ control arrows I get these messages in the console output

Code: Select all

[Error] Origin https://zm.mydoamin.com is not allowed by Access-Control-Allow-Origin.
[Error] XMLHttpRequest cannot load https://zm.mydoamin.com:30107/zm/index.php?view=request&request=stream&connkey=653755&auth=89102f77f4c563b6cbfe876d1417cb26&command=99 due to access control checks.
[Error] Failed to load resource: Origin https://zm.mydoamin.com is not allowed by Access-Control-Allow-Origin. (index.php, line 0)

Can anyone help me?

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

Re: Axis 233D PTZ control

Post by iconnor » Wed Dec 11, 2019 12:21 pm

This looks like a problem with our CORS setup. You are using multi-port but not multi-server I assume.

Update to 1.33.15. I fixed some issues that may relate.

Isaac

IncompleteString
Posts: 22
Joined: Wed May 01, 2019 11:57 pm

Re: Axis 233D PTZ control

Post by IncompleteString » Wed Dec 11, 2019 12:51 pm

Yes, its a multi port, single server set up.

How stable is 1.33.15? This is more or less a production server (as close as it gets on this budget anyway) with over 110 monitors. Just updating the database from 1.32.3 to 1.33.15 could take days, if it goes off with out a problem.


How hard is it to fix the CORS set up? and would you be willing to point me in the right direction to fix it?

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

Re: Axis 233D PTZ control

Post by iconnor » Wed Dec 11, 2019 1:12 pm


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest