CCTV 7"22x Sony Color CCD External PTZ Dome D/N Camera

Post here to indicate any hardware you have used and which is known to work with ZoneMinder. Not for questions.
Post Reply
murkles
Posts: 6
Joined: Tue Oct 10, 2006 12:11 pm
Location: Windermere, UK

CCTV 7"22x Sony Color CCD External PTZ Dome D/N Camera

Post by murkles »

Hi,

I got the following camera working with Zoneminder 1.2.2, pelco-d control script using Suse 10.1 and a Sealevel 2701 PCI RS485 card (although RS232 port with adapter should be just fine):

CCTV 7"22x Sony Color CCD External PTZ Dome D/N Camera
Ebay Seller: tomcctvsuperstore
Example item: 200023425019

They go for about GBP 150 + postage, and are available for shipping most places. Good solid construction, PTZ works great (if a little slow to respond over web brower controller but that's nothing to do with the camera).

Seller was great with communications and delivery - I would recommend paying the extra GBP 15 for an 24V AC adapter (and possibly an RS232->RS485 converter if required) as the adapters aren't easy to source in the UK.

Installation was straight forward - AC connects to unit to power PTZ controller, a AC/DC 12V transformer for camera and 24V AC heater/fan, normal composite video connection, and 2-wire RS485 connection. The arm is hollow allowing the connections to be hidden if required.

Low-light performance is average - not as good as dedicated low light cameras but I use in conjunction with a PIR so not a problem, and I am getting a IR illuminator so this should solve all situations.

They also do a 220x camera fitted for a bit more but that would be total overkill for my application.

Any questions regarding installation please post to this topic.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for posting that. I'm sure people will find it useful.
Phil
murkles
Posts: 6
Joined: Tue Oct 10, 2006 12:11 pm
Location: Windermere, UK

Example captured image...

Post by murkles »

Here is an example of daytime capture to a BTTV card in greyscale mode:

Image

Mark.
Eklectick
Posts: 127
Joined: Sat Nov 20, 2004 1:12 am

Post by Eklectick »

Hi Mark

I have played with IP PTZ cameras, but unfortunately just borrowed, most are still too expensive.

This camera looks good upon price and specs are not so bad, indeed many are equal or higher than top end IP PTZs.

I understand that this camera needs video, power and control cables on the camera side, same 3 that come down to the computer to AC outlet, video on capture card and control cables (for PTZ) that connect I believe to the serial port of the computer or I think some others to the capture card.

I have a couple of questions if you please about controlling the camera remotely.

How many cables and where did you connect controlling cables on the computer side? To Serial port? To capture card? Need any additional hardware to buy for this?

Now, once you have it up and running, I understand that PTZ movement can be achieved through ZM, with of course quite a lag for obvious reasons and perhaps some more if over the internet.
So second question really is, if I were to see just the camera and control its movement (other than ZM) remotely over the internet (no control joysticks) is there an application that could run http on that puter to serve images and a web interface to control this camera that perhaps could up out the serving of images and control or does this have to be in your case only through ZM?

Regards!
murkles
Posts: 6
Joined: Tue Oct 10, 2006 12:11 pm
Location: Windermere, UK

Answers to questions

Post by murkles »

Hi,

In reply to your questions:

Connections required to the camera are:

1. 24V AC power via 2 wires - this is typical of PTZ cameras. In my case I have connected the power not through the dedicated CCTV cable (which would be normal) but separately as power is supplied from an adapter located in the garage. This is the only power connection required - it powers the PTZ motors and circuitry, an inbuild fan/heater and an inbuilt transformer that converts it to 12V DC for the camera.

2. A standard composite connection is required for video connections.

3. Two wires are required to connect up the RS485 control cable.

Note that I use a dedicated CCTV cable that contains a screened composite connection and two pairs for power and control. So I could fully wire up this camera using the one cable. However, as the cable run is long I have chosen to connect up power to a closer source.

I bought a dedicated RS-485 PCI card off ebay for £10 that fits in a spare slot in the computer. This has two 9-pin serial connectors on the back, and I have connected the two control wires of the dedicated CCTV cable to the appropriate pins of one of the 9-pin sockets. The card appears as two standard serial ports.

In leu of a dedicated card, there are a number of adapters available that will convert a standard PC serial port into RS-485. These typically have a 9-pin connector on one end that plugs into your serial port and at the other two screw connectors for the RS-485 signals, so you would connect your RS-485 control lines to that.

In Zoneminder you configure the camera as requiring control, Pelco-D format. My camera by default has id 1, 2400 baud, 8 bit byte and 1 stop bit, no parity. I have to manually configure my serial port to achieve this, once on boot up:

stty -F /dev/ttyS0 cs8 -cstopb ignbrk -ixoff -ixon -isig speed 2400

You seem to be asking two additional questions:

1. Can the camera be controlled outside of ZM? Yes, and in fact I use the following method as it seems to be much quicker controlling the camera.

I have setup a number of aliases from the Linux command line to control the camera directly. For example:

alias zl='echo -e -n "\0377\0001\0000\0004\0034\0000\0041" > /dev/ttyS0'

This means I can type 'zl' and the camera will pan left. Once you know how the Pelco-D protocol is put together these are easy to specify. The easiest way to find out particular commands is to use the ZM controls and take note of the byte-commands that are sent to the camera by monitoring the pelco-d control script log file, which gets written to /tmp/zmctrl-peld.log.

2. If you want to view an image from the camera you could use xawtv or any bttv-compatible viewing program over a vnc session for example, or a raw X-session. I personally don't see the point of not using ZM. You can use ZM in conjunction with the command-line aliases or in fact any other method of controlling the camera. I find the combination of ZM and command-line control is ideal for snappy panning. I intend to modify my command-line aliases to be a bit more intelligent and allow me to specify for how long to pan. So I will be able to say $ zl 0.5 and the camera will pan left for half a second then stop.

Just as a side note the particular camera responds to the 'Home' command on the ZM control panel by entering into a continuous sweeping pan.

Any more questions please feel free to ask.

Regards,

Mark.
Eklectick
Posts: 127
Joined: Sat Nov 20, 2004 1:12 am

Post by Eklectick »

Mark

Great post with info upon CCTV Cam with PTZ. I appreciate your time.

I understand that after connecting everything ZM is the fastest way to access the camera remotely and PTZ to it.

I have found with IP PTZ cams that although ZM does control it, accessing the camera directly renders faster response to PTZ, of course, this is too true for other reasons being how fast the ZM machine is and how fast the upload of the internet connection is. It is true too, that IP cams are specifically designed to be accessed directly via a browser and should respond (and they do) faster.

Accessing an IP PTZ cam over the net I have found to be faster if accessed directly than through ZM even locally.

My question would rather be... if I want to give a link to access the PTZ camera over the net to a member of my family and rather than giving them a crash course on ZM for them to be able to see it, giving them a link which would ask for username and password and show html with available controls to the camera and an image, does an application like this already exist?

Or would this have to be developed by programming html by hand to achive this via the commands you've talked about?

An example of the idea would be to access this from the internet:

1) If you want to use ZM:
"http://XXX.XXX.XXX.XXX/zm/index.php"

2) If you want to directly see the camera:
"http://XXX.XXX.XXX.XXX/ptz/index.html"

By this if you want to access the "policeman" you go ZM way and if you just want to browse the area a little faster and perhaps share your cam with others use another link.

If this were possible somehow "easy", the cost of owning a PTZ would be much cheaper for home use than shoving $1,500USD for an Axis 213 (which I have seen demos and find excellent camera) and shoving an additional $500 to $800USD for the vandal heater/blower dome alone!

I know there are cheaper IP PTZ cams but those do not go high end as yours which is comparable to an Axis213 and a setup way cheaper including wireing and a dedicated computer for less than the cost of the camera alone.

Regards!
murkles
Posts: 6
Joined: Tue Oct 10, 2006 12:11 pm
Location: Windermere, UK

Cheap networked PTZ camera solution

Post by murkles »

Hi,

I don't know whether such software exists, but a quick search of PTZ Pelco-D software did not throw up much when I was looking into the protocol.

It is quite feasible to write a piece of software that will stream images to a web browser and process PTZ commands to control the camera. It may be that no-one has written such a thing because of the proliferation of IP cameras. Your average user will probably be happy with the cheaper PT IP cameras that retail in the £150 mark. I guess what you are asking for is quite specialized (but nonetheless useful). The thing about IP cameras (especially wireless) is that they appear fairly user friendly - one power cable and that's the hardware installation sorted. The reality of the whole experience appears to be much more complicated, with plenty of reports of cheap IP cameras being very difficult/impossible to get working in any reasonable sense.

When you look at installing a wired PTZ camera running via RS485 you are well out of most people's experience, even if in reality it is very easy to get sorted.

However, having said that, I don't think it would be a huge amount of effort to get something working for a specific camera. I once wrote some software to capture a stream of images from a Linux Media Labs card to hard disk and it was surprisingly easy.

Mark.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

if i can undersand what your meaning i could add this to zm4ms but it would need to talk to the camera so would need a converter on the windows machine itself. Maybe its the http process of clicking buttons that slows it. If we could pass move cammnds to zm in a differnt way it might be faster (less latency)
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Eklectick
Posts: 127
Joined: Sat Nov 20, 2004 1:12 am

Post by Eklectick »

Mark
> Your average user will probably be happy with the cheaper PT IP cameras that retail in the £150 mark.
That is true, but if you do have a place to put this kind of PTZ to cover a big area and the zoom... ohhh that is a nice optical zoom you must agree! :-)

Wireless IP cameras do work ok and great with ZM. Only trouble I had once with a Panasonic was that if wireless signal is not good the ZM catpure daemon goes crazy until you get a better signal. Configuration is pretty straight forward and true too, just plug the power and go, quite convenient.
> When you look at installing a wired PTZ camera running via RS485 you are well out of most people's experience, even if in reality it is very easy to get sorted.
I think you would agree with me that perhaps getting this to work these days is much, much easier than in the Windows 98 days, needless to say now in linux than 5 years ago. Perhaps the most tricky part of this deal is to get the RS485 part up and running. Yes its true, its kind of a drag perhaps messing with a little more cables, but hey!.... $2,300USD for an Axis 213 with a "vandal weatherized" dome against your deal... well, I dont mind messin with cables, and better yet knowing as you have stated... it works! :-)

After seeing some of the code to control this PTZ camera, and other code to control IP ones I am pretty sure doing an html page to control a CCTV PTZ should not be hard for an experienced programmer which unfortunately I am not :-S

Now... I have used zm4ms frontend and have found it to be pretty slick, kudos James!

Yet... the practicality of a direct link to the ZM box that would handle the html to access PTZ images and control would by far be much better. Why? well, consider ZM. It works cross-plataform without the need to patch anything!

We all can access ZM through any computer with an IE or Mozilla browser that is connected to the internet without the need of installing any special client or software or activex control like some IP cams need. (Perhaps java, but then again you do not necesarily need it for ZM to work and many machines do have it already installed.)

This is a loveable strength about ZM. It works cross-plataform, accesible from almost anywhere, even mobiles (which I havent tried but anyway kudos Phil!) kickin the butt out of winblows machines that need clients to run cameras and recording software over the internet who by the way do not make such clients for KDE or Gnome in the linux X environment (Linux? huh? what is that?) duh!

Well anyway I am seriously considering buying one of these cctv PTZs... I am sure I have not searched well around the net, someone must have done an html accesible client for these PTZs that could be installed in parallel within the ZM box :-)

Regards!
murkles
Posts: 6
Joined: Tue Oct 10, 2006 12:11 pm
Location: Windermere, UK

Control software for PTZ camera

Post by murkles »

OK, I might be putting myself in it here...

I am a java software engineer and having dug around a little I can safely say that a simple java server application sat on the box containing the capture card and serial port, and a separate java client installed on a remote machine could be coded up quite easily to view one camera and control it via PTZ.

Two sockets would be required: one for the streaming image and one for the PTZ control. That way there would be minimal delay in sending PTZ commands back to the server.

It isn't quite as ubiquitous as you'd like because it requires java to be installed and an application/applet downloaded from the server and potentially requires specific ports to be opened which any firewall would need to be configured for. This is the fastest solution. However, there is nothing to stop you sending all this over http ('tunnelling') which is practical, but I'm not sure about the PTZ stuff - if it's a case of POST'ing (in html speak) then you could well be back to your ZM PTZ control delays and no better off than running ZM itself. I've not really read up about AJAX, which allows asynchronous communication over the net, but I wouldn't be surprised if this would answer the problem of having to POST control commands.

Now if I only had a spare week...
Interesting debate none-the-less.

Regards, Mark

p.s. yes, the optical zoom is _very_ nice :)
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

As a heads-up. I rewrote the PTZ control scripting in ZM a few months ago as the lag does bug me as well. It's still on a branch as I never quite finished converting all the existing scripts yet.

This uses perl modules as the protocol definitions and one single control script. This makes it easier to modify and enhance. Also the script daemonises itself on first use, making subsequent invocations connect via socket. This reduces the time taken to start up and open ports etc (for analog cams).

However it also means that in theory other programs could either just use the modules or even communicate with it and just fire it commands etc without them having to support the protocols themselves. Currently it is designed to use a UNIX socket which does not allow out of box connections but this is trivial to modify if anyone wanted to talk to it.

One other thing to be aware on on the control lag is that it is not always a command lag, sometimes the video is lagging and the cam actually does move more quickly than it appears.
Phil
murkles
Posts: 6
Joined: Tue Oct 10, 2006 12:11 pm
Location: Windermere, UK

PTZ Control Lag

Post by murkles »

Pihl,

I hadn't thought about lag on the video creating an 'illusion' that the PTZ isn't responding quickly.

What I noticed however when I was debugging my setup was a distinct lag between pressing the web control button and the command appearing in the control script log. This, I assumed, was down not to the perl module but to the comms between the web browser, server and perl module. When I run the commands via a remote telnet session I don't experience that lag. Can you explain how the command button mechansim is implemented?

Another thought is to have an option allowing you to pan in increments, so that by pressing a button the pan command is run for 1/2 a second. That way you are less likely to be 'hunting' back and forth to get to a position.

Hope this doesn't sound too much like a rant. You know that ZM is well cool :D :D :D

Having the perl scripts available for use by external programs has gotta save some time :)

Regards, Mark.

p.s. with regards to optical zoom. Very nice, but you need height on the camera mount otherwise you get what I get at the moment - a nice enlarged picture of the ground. I'm planning on relocating the camera to the front of the house now that all the cabling is installed properly, which will put it at two stories rather than one, which clearly isn't enough.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: PTZ Control Lag

Post by zoneminder »

murkles wrote:What I noticed however when I was debugging my setup was a distinct lag between pressing the web control button and the command appearing in the control script log. This, I assumed, was down not to the perl module but to the comms between the web browser, server and perl module. When I run the commands via a remote telnet session I don't experience that lag. Can you explain how the command button mechansim is implemented?
There definatgely is a lag in the command execution as well as any video lag I agree. This is mostly due to the fact that a request has to be submitted, and the web server then has to initiate a fairly heavyweight script. Hopefully the resident script will speed this up a bit but I suspect further work will still be required in this area.
murkles wrote:Another thought is to have an option allowing you to pan in increments, so that by pressing a button the pan command is run for 1/2 a second. That way you are less likely to be 'hunting' back and forth to get to a position.
This is already implemented in the Controol tab of the Monitor settings. It is called Auto Stop Timeout. Subsequent pan, tilt or zoom commands will be followed by a stop command after this delay. Although the delay is then fixed, you can vary the effect by clicking at different points on the controls to select a different speed.
Phil
amppjunior
Posts: 7
Joined: Sun Nov 27, 2005 11:56 am

Post by amppjunior »

Hi,

I bought the same camera, but for some reason it is not showing color images, so I wonder if you had the same trouble and how you fixed it.

Thanks in advance,

Antonio
Post Reply