Control Scripts

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
slbpatrol
Posts: 9
Joined: Sat Feb 03, 2007 10:12 pm

Control Scripts

Post 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.
zylantha
Posts: 8
Joined: Mon Feb 27, 2006 10:36 pm

Post 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.
zylantha
Posts: 8
Joined: Mon Feb 27, 2006 10:36 pm

Post by zylantha »

The basics are now done.

See my post -
http://www.zoneminder.com/forums/viewtopic.php?t=9788
slbpatrol
Posts: 9
Joined: Sat Feb 03, 2007 10:12 pm

Post 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
Post Reply