Page 5 of 5

Posted: Mon Dec 01, 2008 4:16 am
by Normando
Sorry Mike, but I was thinking that is a LAN camera, but it is a serial device camera, and I can't access to it directly via internet.
I'm so sorry, but I can't help you with this issue.

Have you perl::Device::SerialPort module in your server?

Please, check at these files:
http://www.hypertony.co.uk/hardware/pictelfiles.htm

Posted: Mon Dec 01, 2008 4:41 am
by PowerRanger
No problem. Thanks for offering to help anyway.

Tony Sutton's site is what I use for making the serial cable. I tested that it works with a windows program.

I have the picturetel.pl script that used to work with the .22 version. It was adapted originally from the visca.pl script to work with the PictureTel cameras. I also have the Visca script from .22 and the Visca module from .23 so I can see what changed as it was converted into a module. I am trying to convert the .22 script into a module for .23.

One of my problems is I don't have a camera that works with .23. If I try to use the Visca protocol sending to my PicturTel it seems to just send the commands to never never land- I don't see anything about invalid response or anything as I would expect. Therefore I can't see how it is failing so I also can't figure out how to debug my module.
I do see a control socket being created in /tmp when I try to use the Visca module, that does not happen when I try to use my module. All I get is the 'can't connect' message in zmcontrol.log.
In the old PictureTel script, the serial device was defined (/dev/ttyS0) as it also was in the .22 Visca script. I don't see where in the .23 Visca module it is getting the value for the serial port.
It does use Device::SerialPort, but how does it (perl) know that is /dev/ttyS0?
Does that value come from the 'control device' in the control tab of the monitor config?
Is it hard-coded somewhere else?

Mike

Posted: Mon Dec 01, 2008 1:13 pm
by Normando
Yes, this value come from Control Device field as you can see at http://www.zoneminder.com/wiki/index.ph ... ontrol_Tab

At the file zmcontrol.pl change the line

use constant DBG_LEVEL => 0;

to

use constant DBG_LEVEL => 1;

and you will see the debug messages in your control log file.

Remember to delete every .sock file before each try.

Edit: Look at http://www.zoneminder.com/forums/viewto ... 7198#47198 and read the manual, compare PelcoD with your custom Visca module. Have you set the Control Address to 1? like this:
http://www.zoneminder.com/forums/viewto ... ight=ttys0

Posted: Tue Dec 02, 2008 4:39 am
by PowerRanger
Thanks Normando--
use constant DBG_LEVEL => 1;
is what I needed to at least see the visca script being called.

Once I got that working, I started calling just my module
/usr/share/perl5/ZoneMinder/Control$ sudo perl Ptz2n.pm command=reset
The latest version of my module is in this pastebin link http://pastebin.ca/1273057 -- it is horribly broken and it has what I am sure are variable declaration problems, but at least zm can call my module and I can see commands being sent. WooHoo!

Mike

Posted: Thu Jan 22, 2009 1:43 am
by mrd
I finally got around to finishing this and here it is!

http://www.filefactory.com/file/a02he21/n/PTZ2N_tar

You can also check out this post that I just made about a spin-off of this that makes your PTZ-2N into a network PTZ.

http://www.zoneminder.com/forums/viewto ... 8417#48417

On to the next project...

Posted: Tue Feb 03, 2009 5:32 am
by PowerRanger
Thanks mrd-- So far, so good!

I've had the control installed since the night you posted, but have not had _too_ much time to mess with it. Originally I had a problem with tilt not going down too far, but that seems to have sorted itself out. On another box I installed palantir and your generic net control package, but I don't have a compatible usb capture. Mine is pinnacle and works with xawtv but not palantir-- looks like a pallete issue. I was able to see the palantir 'disabled' screen with the -f option, and I could move the cam. I saw a post on the chipset driver project somebody is making good progress on the $20 4 port Easycap usb 2.0 capture dongles. What are you using for usb cap?
On my ZM box I've got a 4 port dvc 200 card, was running skype on video0 and had ZM set to video4 with the new control module. My bro across the country was driving the cam and watching through skype at real good frame rate. Pretty cool.
I think the crucial part I was missing when I was trying to convert to a module was the:
Install Module::Load on Ubuntu systems that use the .deb zm package:
aptitude install libmodule-load-perl
I was getting frustrated and finally just had to walk away. I've got 4 canon vc-c1 and the spec and example server code so I'm gonna try to make a module for that soon.

Mike

Posted: Tue Feb 03, 2009 11:26 pm
by mrd
I'm so glad to hear that someone is getting some use out of this stuff!!!

I hope they include this and the other one I wrote into the next release so that I don't have to maintain the links to them. I'll get around to finishing the PTZ4n one in the next few weeks if anyone cares.

The only USB capture device that I've been able to get to work is an old Osprey one that I can't find anywhere. I think it uses a Nogatech/Zoran chipset and shows up as a Hauppauge USB live in the dmesg output. The other device I've had success with on a laptop is a PCMCIA capture card made by Lifeview, but also hard to find these days. The hauppauge ones seem to be available new, but they are kind of pricy at around $50US. I'll probably try one out sometime soon and let you know if they work. Also, if your capture device works with xawtv, you should defintly try the development version of palantir from their download page. I couldn't get my USB device to work on the compiled or released versions of it.

Posted: Tue Feb 03, 2009 11:55 pm
by cordel
mrd wrote: I hope they include this and the other one I wrote into the next release so that I don't have to maintain the links to them. I'll get around to finishing the PTZ4n one in the next few weeks if anyone cares.
Just have to email it to one of us and we can ;)

Posted: Fri Feb 27, 2009 2:14 pm
by crazy4offroad
The download link on the site is dead does anyone have a good link to get this script from? Thanks! :D

Posted: Thu Jun 11, 2009 2:27 am
by gneuf
I can put mrd's 4N scripts where I have my older 2N scripts - I've edited the post to point to my 2N script's new location...see the beginning of this thread, about 4 posts down. It the 1.22.3 version.

Post if that link isn't working. And be careful you don't try the first post - it's for the older version of the script and isn't there anymore - that machine finally gave up the ghost after 11 years...RIP Kludge

I'm looking at mrd's newer style script so I can finally get to updating them for the latest version of ZM.

Posted: Thu Jun 11, 2009 1:10 pm
by mrd
Hi Glen!

The script that I had finished was for the PTZ-2N, but I have one for the PTZ-4N about 90% done too. I've just been lazy and no one has asked about it. I can finish it up soon though and send them all to Cordel to include in the next release along with the generic remote network control module that I wrote too.

Michael

Posted: Thu Jun 11, 2009 3:59 pm
by gneuf
That's fantastic! I'll download it and check it out.

PTZ4N

Posted: Thu Nov 12, 2009 9:24 pm
by n1gp
Hi mrd

Have you been able to get your script working on the PTZ4N?

I have picked one up and looking forward to giving it a try.

Thanks