PTZ with Orbit AF
PTZ with Orbit AF
So I have 1.24 (2740) running nicely on Ubuntu 8.10 and decided to try and get my nice new shiny Orbit AF working.
Managed to get great video using mjpg-streamer running locally on the same box.
So decided to try PTZ using the instructions listed here by mgc8
http://www.zoneminder.com/forums/viewto ... hlight=ptz
According to the zmconrol log commands are being generated when I hit the movement icons and they are being sent to sys/class/video4linux/video1/control/pan_tilt, but the folder pan_tilt doesn't exist. I've made sure the permissions are ok, but still no pan_tilt folder or camera movement.
One small deviation I made from the instructions was to create Pwc as Type=remote rather than local - if I don't do this it doesn't show up as an option in the control tab. See below:
1. Create the new "Control Type" in the web interface with a name of your choosing, specifying Type=Local, Protocol=Pwc and only "Can reset".
Any suggestions ?
Thanks Tim
Managed to get great video using mjpg-streamer running locally on the same box.
So decided to try PTZ using the instructions listed here by mgc8
http://www.zoneminder.com/forums/viewto ... hlight=ptz
According to the zmconrol log commands are being generated when I hit the movement icons and they are being sent to sys/class/video4linux/video1/control/pan_tilt, but the folder pan_tilt doesn't exist. I've made sure the permissions are ok, but still no pan_tilt folder or camera movement.
One small deviation I made from the instructions was to create Pwc as Type=remote rather than local - if I don't do this it doesn't show up as an option in the control tab. See below:
1. Create the new "Control Type" in the web interface with a name of your choosing, specifying Type=Local, Protocol=Pwc and only "Can reset".
Any suggestions ?
Thanks Tim
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
Here is the needed file, I use it now and it works. I've sent it to Phil to include in the newest 1.24. The file was not created by me, so thanks to the other forum members who started working on this. You'll see it mentioned in the forums under several posts. Just send me a PM if you need the control settings for the Orbit.
http://209.20.65.28/br549/mjpgStreamer.pm
Just looked at your link you posted, yes those control settings with work with the mjpgStreamer file. Let me know if you get a couple errors above the control arrows when switching to control mode. I'd like for someone to help me get rid of the errors and I'm sure it's pretty simple, I just don't have the time.
http://209.20.65.28/br549/mjpgStreamer.pm
Just looked at your link you posted, yes those control settings with work with the mjpgStreamer file. Let me know if you get a couple errors above the control arrows when switching to control mode. I'd like for someone to help me get rid of the errors and I'm sure it's pretty simple, I just don't have the time.
Thanks for the file....
will try it out later today. PM sent
Tim
Tim
Next problem...
So I created mjpgStreamer.pm and did a full restart just in case. Thanks Newvisionantenna !
Still no movement - but I do see this in the logs now and a zmcontrol.sock is created.
02/05/09 17:03:22.232243 zmcontrol[8058].INF [Control server 4/mjpgStreamer starting at 09/02/05 17:03:22]
02/05/09 17:03:23.245540 zmcontrol[8058].FAT [Can't access moveRelUpRight member of object of class ZoneMinder::Control::mjpgStreamer]
Permissions look ok
-r--r--r-- 1 root root 10989 2008-07-25 02:48 AxisV2.pm
-rw-r--r-- 1 root root 5512 2009-02-05 16:41 mjpgStreamer.pm
After clicking on the pan / tilt controls a few time a window pops up with this message:
Control response was status = undefined
message = /usr/local/bin/zmcontrol.pl --panspeed=1 --panstep=200 --command=moveRelLeft --id=4=>
Not sure what to do about it.
Also when I click on a pan / tilt icon I notice the zmcontrol-4.sock changes momentarily to a text icon - so I guess a message is being passed.
Any suggestions ?
Thanks Tim
Still no movement - but I do see this in the logs now and a zmcontrol.sock is created.
02/05/09 17:03:22.232243 zmcontrol[8058].INF [Control server 4/mjpgStreamer starting at 09/02/05 17:03:22]
02/05/09 17:03:23.245540 zmcontrol[8058].FAT [Can't access moveRelUpRight member of object of class ZoneMinder::Control::mjpgStreamer]
Permissions look ok
-r--r--r-- 1 root root 10989 2008-07-25 02:48 AxisV2.pm
-rw-r--r-- 1 root root 5512 2009-02-05 16:41 mjpgStreamer.pm
After clicking on the pan / tilt controls a few time a window pops up with this message:
Control response was status = undefined
message = /usr/local/bin/zmcontrol.pl --panspeed=1 --panstep=200 --command=moveRelLeft --id=4=>
Not sure what to do about it.
Also when I click on a pan / tilt icon I notice the zmcontrol-4.sock changes momentarily to a text icon - so I guess a message is being passed.
Any suggestions ?
Thanks Tim
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
When you setup the new control entry did you make sure you called the protocol mjpgStreamer? It looks like you did from the zmcontrol output, but just making sure. Other then that the only difference I can think of is i'm using a remote device where you are using the device locally.
The only things I set where in the first 4 tabs, didn't touch anything else.
First tab was set to remote, mjpgStreamer, and can reset.
Move tab I only checked "can move" because the file currently only allows up, down, left, and right, (I'll check these when I get home, but I'm pretty sure my numbers where alittle backwards compared to that link)
3. "Pan" tab -> Can Pan Min Range: -7000, Max Range: 7000, Min Step: 0, Max Step: 0, Has Pan Speed, Min/Max Speed=200
4. "Tilt" tab -> Can Tilt Min Range: -2500, Max Range: 2500, Min Step: 0, Max Step: 0, Has Tilt Speed, Min/Max Speed=100
And then back on the control page I have the IP address of where the camera is at. I guess you would have to input the device data or maybe you could keep it set to remote and input localhost or the actual ip address of your computer under control address or device.
The only things I set where in the first 4 tabs, didn't touch anything else.
First tab was set to remote, mjpgStreamer, and can reset.
Move tab I only checked "can move" because the file currently only allows up, down, left, and right, (I'll check these when I get home, but I'm pretty sure my numbers where alittle backwards compared to that link)
3. "Pan" tab -> Can Pan Min Range: -7000, Max Range: 7000, Min Step: 0, Max Step: 0, Has Pan Speed, Min/Max Speed=200
4. "Tilt" tab -> Can Tilt Min Range: -2500, Max Range: 2500, Min Step: 0, Max Step: 0, Has Tilt Speed, Min/Max Speed=100
And then back on the control page I have the IP address of where the camera is at. I guess you would have to input the device data or maybe you could keep it set to remote and input localhost or the actual ip address of your computer under control address or device.
Last edited by newvisionantenna on Fri Feb 06, 2009 5:09 am, edited 2 times in total.
So I got rid of the error message...
[Can't access moveRelUpRight member of object of class ZoneMinder::Control::mjpgStreamer]
By editing the mjpgStreamer script moveconLeft to move moveRelright etc
I'll try the settings you suggest
Which resulted in the following messages - progress but no movement...
02/05/09 21:28:17.077722 zmcontrol[12627].DBG [Move Up]
02/05/09 21:28:17.077822 zmcontrol[12627].DBG [Tx[2]]
02/05/09 21:28:17.871371 zmcontrol[12627].DBG [Move Down]
02/05/09 21:28:17.871455 zmcontrol[12627].DBG [Tx[2]]
I think my problem lies with control device and control address.
Currently they are
/sys/class/video4linux/orbit/pan_tilt (I have a udev rule which links video1 to orbit, neither works)
Control address localhost:8080 - I've tried other combinations.
If you or anyone else wants to have a play go to
74.87.27.30/html/zm and mess with orbit
I'm right out of ideas for now...
Tim
By editing the mjpgStreamer script moveconLeft to move moveRelright etc
I'll try the settings you suggest
Which resulted in the following messages - progress but no movement...
02/05/09 21:28:17.077722 zmcontrol[12627].DBG [Move Up]
02/05/09 21:28:17.077822 zmcontrol[12627].DBG [Tx[2]]
02/05/09 21:28:17.871371 zmcontrol[12627].DBG [Move Down]
02/05/09 21:28:17.871455 zmcontrol[12627].DBG [Tx[2]]
I think my problem lies with control device and control address.
Currently they are
/sys/class/video4linux/orbit/pan_tilt (I have a udev rule which links video1 to orbit, neither works)
Control address localhost:8080 - I've tried other combinations.
If you or anyone else wants to have a play go to
74.87.27.30/html/zm and mess with orbit
I'm right out of ideas for now...
Tim
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
here's the log entry from your attempts...
looks like we're back to the mismatch of object classes which I'd fixed by editing the script.
This is what was in the log from your tweaks:
02/05/09 22:42:53.351671 zmcontrol[20872].DBG [Camera open]
02/05/09 22:42:54.314836 zmcontrol[20872].DBG [Camera AUTOLOAD]
02/05/09 22:42:54.314931 zmcontrol[20872].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
02/05/09 22:42:58.112245 zmcontrol[20880].DBG [--command=Right --id=4]
02/05/09 22:42:58.113523 zmcontrol[20880].INF [Starting control server 4/mjpgStreamer]
02/05/09 22:42:58.114644 zmcontrol[20881].INF [Control server 4/mjpgStreamer starting at 09/02/05 22:42:58]
02/05/09 22:42:58.158288 zmcontrol[20881].DBG [Camera New]
02/05/09 22:42:58.158979 zmcontrol[20881].DBG [Camera open]
02/05/09 22:42:59.115921 zmcontrol[20881].DBG [Camera AUTOLOAD]
02/05/09 22:42:59.116099 zmcontrol[20881].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
02/05/09 22:43:00.833104 zmcontrol[20884].DBG [--command=Right --id=4]
02/05/09 22:43:00.834606 zmcontrol[20884].INF [Starting control server 4/mjpgStreamer]
02/05/09 22:43:00.836142 zmcontrol[20885].INF [Control server 4/mjpgStreamer starting at 09/02/05 22:43:00]
02/05/09 22:43:00.861929 zmcontrol[20885].DBG [Camera New]
02/05/09 22:43:00.862471 zmcontrol[20885].DBG [Camera open]
02/05/09 22:43:01.850511 zmcontrol[20885].DBG [Camera AUTOLOAD]
02/05/09 22:43:01.850625 zmcontrol[20885].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
02/05/09 22:43:03.094987 zmcontrol[20895].DBG [--command=Right --id=4]
02/05/09 22:43:03.098139 zmcontrol[20895].INF [Starting control server 4/mjpgStreamer]
02/05/09 22:43:03.109118 zmcontrol[20896].INF [Control server 4/mjpgStreamer starting at 09/02/05 22:43:03]
02/05/09 22:43:03.135065 zmcontrol[20896].DBG [Camera New]
02/05/09 22:43:03.135600 zmcontrol[20896].DBG [Camera open]
02/05/09 22:43:04.126317 zmcontrol[20896].DBG [Camera AUTOLOAD]
02/05/09 22:43:04.126413 zmcontrol[20896].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
Previously the log was showing this which to my untrained eye looked promising. Ihad set the commands to only
02/05/09 21:27:43.292119 zmcontrol[12626].INF [Starting control server 4/mjpgStreamer]
02/05/09 21:27:43.293277 zmcontrol[12627].INF [Control server 4/mjpgStreamer starting at 09/02/05 21:27:43]
02/05/09 21:27:43.319284 zmcontrol[12627].DBG [Camera New]
02/05/09 21:27:43.319813 zmcontrol[12627].DBG [Camera open]
02/05/09 21:27:44.295014 zmcontrol[12627].DBG [Camera Reset]
02/05/09 21:27:44.295105 zmcontrol[12627].DBG [Tx[2]]
02/05/09 21:27:50.565984 zmcontrol[12627].DBG [Move Left]
02/05/09 21:27:50.566118 zmcontrol[12627].DBG [Tx[2]]
02/05/09 21:27:51.371362 zmcontrol[12627].DBG [Move Left]
This is a typical edit I made:
sub moveRelUp
{
my $self = shift;
Debug( "Move Up" );
my $cmd = "?action=command&command=tilt_minus";
$self->sendCmd( $cmd );
}
Anymore ideas ?
This is what was in the log from your tweaks:
02/05/09 22:42:53.351671 zmcontrol[20872].DBG [Camera open]
02/05/09 22:42:54.314836 zmcontrol[20872].DBG [Camera AUTOLOAD]
02/05/09 22:42:54.314931 zmcontrol[20872].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
02/05/09 22:42:58.112245 zmcontrol[20880].DBG [--command=Right --id=4]
02/05/09 22:42:58.113523 zmcontrol[20880].INF [Starting control server 4/mjpgStreamer]
02/05/09 22:42:58.114644 zmcontrol[20881].INF [Control server 4/mjpgStreamer starting at 09/02/05 22:42:58]
02/05/09 22:42:58.158288 zmcontrol[20881].DBG [Camera New]
02/05/09 22:42:58.158979 zmcontrol[20881].DBG [Camera open]
02/05/09 22:42:59.115921 zmcontrol[20881].DBG [Camera AUTOLOAD]
02/05/09 22:42:59.116099 zmcontrol[20881].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
02/05/09 22:43:00.833104 zmcontrol[20884].DBG [--command=Right --id=4]
02/05/09 22:43:00.834606 zmcontrol[20884].INF [Starting control server 4/mjpgStreamer]
02/05/09 22:43:00.836142 zmcontrol[20885].INF [Control server 4/mjpgStreamer starting at 09/02/05 22:43:00]
02/05/09 22:43:00.861929 zmcontrol[20885].DBG [Camera New]
02/05/09 22:43:00.862471 zmcontrol[20885].DBG [Camera open]
02/05/09 22:43:01.850511 zmcontrol[20885].DBG [Camera AUTOLOAD]
02/05/09 22:43:01.850625 zmcontrol[20885].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
02/05/09 22:43:03.094987 zmcontrol[20895].DBG [--command=Right --id=4]
02/05/09 22:43:03.098139 zmcontrol[20895].INF [Starting control server 4/mjpgStreamer]
02/05/09 22:43:03.109118 zmcontrol[20896].INF [Control server 4/mjpgStreamer starting at 09/02/05 22:43:03]
02/05/09 22:43:03.135065 zmcontrol[20896].DBG [Camera New]
02/05/09 22:43:03.135600 zmcontrol[20896].DBG [Camera open]
02/05/09 22:43:04.126317 zmcontrol[20896].DBG [Camera AUTOLOAD]
02/05/09 22:43:04.126413 zmcontrol[20896].FAT [Can't access moveConRight member of object of class ZoneMinder::Control::mjpgStreamer]
Previously the log was showing this which to my untrained eye looked promising. Ihad set the commands to only
02/05/09 21:27:43.292119 zmcontrol[12626].INF [Starting control server 4/mjpgStreamer]
02/05/09 21:27:43.293277 zmcontrol[12627].INF [Control server 4/mjpgStreamer starting at 09/02/05 21:27:43]
02/05/09 21:27:43.319284 zmcontrol[12627].DBG [Camera New]
02/05/09 21:27:43.319813 zmcontrol[12627].DBG [Camera open]
02/05/09 21:27:44.295014 zmcontrol[12627].DBG [Camera Reset]
02/05/09 21:27:44.295105 zmcontrol[12627].DBG [Tx[2]]
02/05/09 21:27:50.565984 zmcontrol[12627].DBG [Move Left]
02/05/09 21:27:50.566118 zmcontrol[12627].DBG [Tx[2]]
02/05/09 21:27:51.371362 zmcontrol[12627].DBG [Move Left]
This is a typical edit I made:
sub moveRelUp
{
my $self = shift;
Debug( "Move Up" );
my $cmd = "?action=command&command=tilt_minus";
$self->sendCmd( $cmd );
}
Anymore ideas ?
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
As soon as I get back home I'll setup my Orbit AF and let you play with it. Keep in mind, my mjpg_streamer is running on a modded Linksys NSLU2 with a custom build of Openwrt 7.09. I don't think there should be anything differnet then what your running on Ubuntu 8.10. I do want to point out something to everyone that looked at your link. The picture quality is just amazing and requires very little power to run really high res. This is why I'm working on and have already finished building WiFi Repeaters with both Mjpg_streamer and lower models with Spca5xx, PWC, and other drivers for building a huge security network in no time at all. Just imagine paying around $150 total for device and Orbit Cam to run remote Wireless Camera's anywhere. There is no way your going to beat that price. Granted they might not be water proof, but I'm sure an outdoor case could be purchased or made.
Alright, sorry for getting sidetracked, I'll help you get it working or atleast show you that mine works and we can figure it out from there. I have no problems using pan, tilt, and reset with my Orbit and mjpg_streamer. Look for a PM later this evening and hope we can get this worked out.
Alright, sorry for getting sidetracked, I'll help you get it working or atleast show you that mine works and we can figure it out from there. I have no problems using pan, tilt, and reset with my Orbit and mjpg_streamer. Look for a PM later this evening and hope we can get this worked out.
Thanks again for all your help so far....
yes the picture quality from the logitech pro and orbit AF is truly amazing even under low light conditions.
I've also ordered a Linksys NSLU2 - should be here early next week. So more fun to come.
I think I'm missing something with the PTZ as the logs indicate commands are being generated - but no movement.
I'm wondering if I have some wrong / missing with mjpgstreamer ?
Question - do you see /sys/class/video4linux/videoX/pan_tilt ?
I don't see the pan_tilt folder being created - might be a red herring.
FYI Currently running mjpgstreamer on a Q6600 quad core with 2G ram on a ASUS p5k P45 motherboard with a 200G SATA drive.
Even running 8 cameras and two instances of mjpgstreamer the box typically only runs at 50% at 1.7GHz - only scaling up to 2.4GHz when streaming a full montage locally.
I've also ordered a Linksys NSLU2 - should be here early next week. So more fun to come.
I think I'm missing something with the PTZ as the logs indicate commands are being generated - but no movement.
I'm wondering if I have some wrong / missing with mjpgstreamer ?
Question - do you see /sys/class/video4linux/videoX/pan_tilt ?
I don't see the pan_tilt folder being created - might be a red herring.
FYI Currently running mjpgstreamer on a Q6600 quad core with 2G ram on a ASUS p5k P45 motherboard with a 200G SATA drive.
Even running 8 cameras and two instances of mjpgstreamer the box typically only runs at 50% at 1.7GHz - only scaling up to 2.4GHz when streaming a full montage locally.
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
mjpg_Steamer with Logitech Sphere AF
Following on from others in this thread I'm trying to get mjpgStreamer.pm pan/tilt controls working.
I have the above USB camera streaming using mpjeg_streamer and the pm setup up in zoneminder; remote, protcol=mjpeg_Streamer
In the camera setup I don't know what values to use for Control Device?
No pan_tilt directory exists for this USB camera, and when I put either a blank or dummy path (/sys/class/video4linux/video4/pan_tilt) in here I get errors in syslog (see above) which effective stop control commands being issued. That is, no socket is set up and subsequent commands fail to issue because the socket file doesn't exist so execution stops at that point.
Any suggests on what "Control Device" settings to use for remote devices like mjpeg_streamer? What has other used?
Thanks
Raymond
Code: Select all
video1 UVC Camera (046d:0994)
Bus 006 Device 002: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF
Code: Select all
/usr/local/bin/mjpg_streamer -i "input_uvc.so -d /dev/video1 -r 640x480 -f 10"
-o "output_http.so -p 8080" &>/tmp/webcam-mjpg-streamer.log &
Code: Select all
/sys/class/video4linux/video1$ ls -l
total 0
-rw-rw-rw- 1 root root 4096 2009-02-08 19:36 dev
lrwxrwxrwx 1 root root 0 2009-02-08 19:47 device -> ../../../6-2:1.0
-rw-rw-rw- 1 root root 4096 2009-02-08 19:47 index
-rw-rw-rw- 1 root root 4096 2009-02-08 19:47 name
drwxrwxrwx 2 root root 0 2009-02-08 19:47 power
lrwxrwxrwx 1 root root 0 2009-02-08 19:36 subsystem -> ../../../../../../../../class/video4linux
-rw-rw-rw- 1 root root 4096 2009-02-08 19:36 uevent
Code: Select all
Feb 8 20:06:51 Hammerstien zmfix[8773]: ERR [Can't stat /sys/class/video4linux/video1/pan_tilt: No such file or directory]
....
Feb 8 21:34:01 Hammerstien zmcontrol[11652]: FAT [Can't connect: No such file or directory, /tmp/zmcontrol-6.sock]
No pan_tilt directory exists for this USB camera, and when I put either a blank or dummy path (/sys/class/video4linux/video4/pan_tilt) in here I get errors in syslog (see above) which effective stop control commands being issued. That is, no socket is set up and subsequent commands fail to issue because the socket file doesn't exist so execution stops at that point.
Any suggests on what "Control Device" settings to use for remote devices like mjpeg_streamer? What has other used?
Thanks
Raymond
Re: mjpg_Steamer with Logitech Sphere AF
Got this working (almost) at last: Notes in this thread.ris2t wrote:Following on from others in this thread I'm trying to get mjpgStreamer.pm pan/tilt controls working.
Code: Select all
video1 UVC Camera (046d:0994) Bus 006 Device 002: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF
http://www.zoneminder.com/forums/viewto ... 9329#49329
Current problems relate to uvcdynctrl not initalise the pan/tilt aspects probably but thats all unrelated to zoneminder or mjpg_streamer.