Page 1 of 1

Control Scripts

Posted: Sat Feb 03, 2007 10:24 pm
by slbpatrol
I have a Logitech Quickcam Orbit. I've seen post on writing control scripts for the PTZ. The problem is that even when I try to access the other parts of the camera (not video)I still get an error that the camera is in use. I've written C code that will accept parameters passed by Zoneminder but the request to move the camera fails. Does any one know how to access the controls or get the handle of the camera device from Zoneminder? I tried access the camera from the USB port but it also states that the device is busy.

Posted: Sun Jul 15, 2007 1:00 am
by zylantha
Here is your solution...

in the folder -
/sys/class/video4linux/video0

there is a file called "pan_tilt"

If you write the desired coordinates of the camera to this file, e.g.

echo 1000 2000 >pan_tilt

The camera will point to that location even while Zoneminder has the device open.

All you need is to rewrite one of the camera control scripts to do this.

Posted: Sun Jul 15, 2007 8:31 am
by zylantha
The basics are now done.

See my post -
http://www.zoneminder.com/forums/viewtopic.php?t=9788

Posted: Tue Jul 17, 2007 2:49 am
by slbpatrol
It's been a while when I stopped working with this. I decided to start on it again and just happened to search if someone answered my post. I had started looking into using sysfs and found the file pan_tilt. Thanks for the code, it's definitely saving me some time. I will see what I can do to optimize it.

Thanks again. :D