newbie question. it cant possibly be this hard...

Forum for questions and support relating to the 1.25.x releases only.
jfreetrader
Posts: 2
Joined: Sun Sep 30, 2012 11:08 pm

newbie question. it cant possibly be this hard...

Post by jfreetrader »

Hello,
im relativly new to linux. ive given it several honest to god effors, a few have panned out, but most times it proves too dificult to stick with.
i really REALLY dont want that to be the case this time.

i am trying to set up Zoneminder on Ubuntu (latest ver). got it installed, and finally got one of my wireless Wanscam IP cameras to work with it. can see video, ect. ive read several things about how you need to add a control script to the perl folder in order for any of the PTZ functions to work. i can totally understand that...

i seem to be TOTALLY missing something, because in all the instructions it says to "make a .PT file in usr/share/perl5/zoneminder/control" (http://www.zoneminder.com/wiki/index.php/Wanscam is an example of one of the many pages that instruct this) but i cant! dont have the permission it seems. can not modify an existing one, or drag one in from the desk top...

again, i dont know much about Linux or Ubuntu, i MUST be missing something very obvious...
any help would be great. and the sooner the better... my wifes starting to get pissed that ive been working on this 'little project' so long. (just moved into a new house, many things to do)

thanks so much for your help!

-JFreetrader
jfreetrader
Posts: 2
Joined: Sun Sep 30, 2012 11:08 pm

Re: newbie question. it cant possibly be this hard...

Post by jfreetrader »

well... finally figured out how to make the file... sudo gedit or whatever.
got that made, followed the instructions on http://www.zoneminder.com/wiki/index.ph ... R4020A2_PT to the letter.. still cant get my PTZ to work..

i guess ill make a new thread asking for help in that regard.

-JFreetrader
erpo41
Posts: 18
Joined: Mon Jan 24, 2011 7:11 am

Re: newbie question. it cant possibly be this hard...

Post by erpo41 »

Zoneminder is definitely not a program that just works out of the box. I would recommend either waiting until you have a lot of Linux experience before trying to get zoneminder working, or being prepared for a lot of challenges.
ihr
Posts: 19
Joined: Sun Aug 26, 2012 11:20 am

Re: newbie question. it cant possibly be this hard...

Post by ihr »

@jfreetrader

I'm afraid this is not a solution to your (our) problem, as i'm having the same problem, just with an Apexis J901 PTZ camera.
Aparently noone has a solution to this problem, whitch makes ZoneMinder more or less useless with PTZ cameras.

I have seen several entries in the Forum concerning control of PTZ cameras, so it makes me think it has nothing to do with the control-script itself, but must be a flaw in ZoneMinder or maybe in Perl.

Whitout being a programmer, i have been digging a bit into the problem, and to me it looks like the script zmcontrol.pl is hanging when trying to load the camera-specific control-module (in my case it's ApexisMjpegIP.pm) untill it eventually times-out with the known error "Control responce was status = undefined message = /usr/bin/zmcontrol.pl --autostop --command=moveConUp --id=1=>".

I'm still hoping that sombody is able to solve this problem, otherwise i'll have to trash ZoneMinder and find something more suitable for use with PTZ cameras.

IHR
atreus769
Posts: 10
Joined: Thu Oct 11, 2012 1:11 pm

Re: newbie question. it cant possibly be this hard...

Post by atreus769 »

Look at your file again and make sure that it is saved as a PM file not a PT. I saw in your original post you were talking about making a PT file. Full path should be:

/usr/share/perl5/ZoneMinder/Control/Wanscam.pm
ihr
Posts: 19
Joined: Sun Aug 26, 2012 11:20 am

Re: newbie question. it cant possibly be this hard...

Post by ihr »

@atreus769

Hi,
For my sake I'm absolutely certain my Control-file is /usr/share/perl5/ZoneMinder/Control/ApexisMjpegIP.pm.

So it must be something else !!
Have you got any other ideas ?

Regards
IHR
atreus769
Posts: 10
Joined: Thu Oct 11, 2012 1:11 pm

Re: newbie question. it cant possibly be this hard...

Post by atreus769 »

Is there anyway you can upload your ApexisMjpegIP.pm file? Then I can take a look at what might be causing the issue.

The other thing, is what do you have setup for the PTZ control settings when you set it up? The section that has the type, can wake, can sleep, etc.

What make/model of your camera do you have?
ihr
Posts: 19
Joined: Sun Aug 26, 2012 11:20 am

Re: newbie question. it cant possibly be this hard...

Post by ihr »

@atreus769.

This is my 2.nd attept to answer your questions - the first one apparenly somehow got lost in space . . .
Again thanks a lot for taking the time to help me out.

To the facts:
My camera model is Apexis APM-J901-Z-WS.
The setup is exatly as described in the zoneminder device list for this camera. This includes the configuration of can tilt, can zoom ect. as well as the control-file ApexisMjpegIP.pm which was copied directly from the entry in the above mentioned device list. I did change the username and password for connection to the camera.

If I point my browser - usually Firefox - directly to the camera everything works just perfectly.

Attached is my copy of the Apexis control-file.

Regards
ihr
atreus769
Posts: 10
Joined: Thu Oct 11, 2012 1:11 pm

Re: newbie question. it cant possibly be this hard...

Post by atreus769 »

Sorry for the slow response been working like crazy the past few days. But we can see if something is going on with your control file. Open a window and log in directly to your camera so you can see the video stream. Then open another window, not just a tab. This way you can have both windows open right next to each other.

In your new window, type in the following address, 'YOUR_CAMERA_IP:PORT/decoder_control.cgi?command=0'
This should move your camera up in your video stream. If this works, you can try the other commands also, to verify they are working:

Up:
command=0

Down:
command=2

Left:
command=4

Right:
command=6


If all of these commands do what you need to do, then we can now start looking at your PM file and the control selection that you have. Might take a few more postings, but we should be able to get you going!
atreus769
Posts: 10
Joined: Thu Oct 11, 2012 1:11 pm

Re: newbie question. it cant possibly be this hard...

Post by atreus769 »

If that doesn't work try this url to move it:

YOUR_CAM_IP:PORT/cgi-bin/decoder_control.cgi?type=0&cmd=0&user=USERNAME&pwd=PASSWORD

Just change your 'cmd=' part of the url to move it in different directions. If this works, then we will just have to rewrite the PM file to fix you up.
ihr
Posts: 19
Joined: Sun Aug 26, 2012 11:20 am

Re: newbie question. it cant possibly be this hard...

Post by ihr »

@atreus769

Hi again,

Your first suggestion works perfectly !, so what do I do next ?

ihr
atreus769
Posts: 10
Joined: Thu Oct 11, 2012 1:11 pm

Re: newbie question. it cant possibly be this hard...

Post by atreus769 »

That's good that it worked. Now there is one more thing to check, sorry I forgot to put this in my post.

The next thing is that I am trying to find the exact URL for your camera to control it, then we can modify the PM file as needed.

Open your camera directly in a window, let's say firefox. Now open an IE window next to that, and enter in the URL:

CAM_IP:PORT/decoder_control.cgi?command=0&user=USERNAME&pwd=PASSWORD

And see if that moves your camera for you? We are almost there!
ihr
Posts: 19
Joined: Sun Aug 26, 2012 11:20 am

Re: newbie question. it cant possibly be this hard...

Post by ihr »

"atreus769

That worked as well !

ihr
atreus769
Posts: 10
Joined: Thu Oct 11, 2012 1:11 pm

Re: newbie question. it cant possibly be this hard...

Post by atreus769 »

Ok, let's go into your PM file and take a look at what you have. Towards the beginning of the file there is a line under the sendCmd() function, that starts off looking like:

my $req = HTTP::Request->new

Try and set your username and password in that line to what you have to access your camera directly. Try and restart your entire server, not just Zoneminder. Then try and log back into Zoneminder and try and control your camera. If that doesn't work, then go into your control settings of that camera on Zoneminder and change the 'Control Address' field to just the IP:PORT instead. Then restart your server, and log back into Zoneminder and try it again.
ihr
Posts: 19
Joined: Sun Aug 26, 2012 11:20 am

Re: newbie question. it cant possibly be this hard...

Post by ihr »

@atreus769

Hi again,

The line in the PM-file you mention has right from the beginning been updated with username and password. It might not be in the copy of the file I send to you, but I have just re-checked it is in the actual pm-file. Your 2.nd suggestion doesn't work either - I still get status=undefined in responce to click on any control element.

ihr
Locked