PTZ control from serial port (RS485 and Pelco P protocol)

Forum for questions and support relating to the 1.25.x releases only.
Locked
fruizalonso
Posts: 4
Joined: Tue May 28, 2013 6:56 pm

PTZ control from serial port (RS485 and Pelco P protocol)

Post by fruizalonso »

Hi.
I'm newbie with zoneminder and I have a little big problem with the PTZ control using a serial port ( /dev/ttyS0 ) with an a RS232-RS485 adapter. It works fine from Windows (tested with 100 meters of cable and PTZController) but do nothing from my Zoneminder installation.

I set the device ( /dev/ttyS0 ), the protocol (Pelco P), ... but it do NOTHING. In the log, when I attempt to move de cámera I get the following records:
COMPONENT PID LEVEL MESSAGE FILE LINE
zmcontrol 4213 INF Starting control server 6/PelcoP zmcontrol.pl 0
zmcontrol 4215 INF Control server 6/PelcoP starting at 13/05/28 19:58:04 zmcontrol.pl 0
zmcontrol 4213 FAT Can't connect: No such file or directory zmcontrol.pl 0
web_php 4094 ERR /usr/bin/zmcontrol.pl --tiltspeed=46 --autostop --command=moveConUp --id=6=> /usr/share/zoneminder/includes/functions.php 2323
web_php 4171 ERR socket_sendto( /tmp/zm/zms-044900s.sock ) failed: No such file or directory /usr/share/zoneminder/includes/functions.php 2323

My OS system is Ubuntu 13.04 desktop 64bit, Zoneminder 1.25
I've tried to another RS485 adapter (USB serial adapter, /dev/ttyUSB0 on my system) and I got the same result.
Any hints or help for me?. What am I doing wrong?. A serial port permissions problem maybe?.

Thanks.
fruizalonso
Posts: 4
Joined: Tue May 28, 2013 6:56 pm

Re: PTZ control from serial port (RS485 and Pelco P protocol

Post by fruizalonso »

Please, help me to configure serial port for PELCO D or PELCO P protocol.
I'm using Ubuntu 13.04 Desktop(64bit), I configured the PTZ camera with Pelco-P 9600 baud and address 1.
From Windows with PTZController it's works fine, but from Ubuntu ... nothing.
I'm sure the problem is configuration (9600,8,N,1,1) but...
Please, help
help
help
heeeeeelp
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: PTZ control from serial port (RS485 and Pelco P protocol

Post by jameswilson »

you might want to try the address either side of the actual address in the head.
Im not sure which but one of the pelco protocols p or d, has it +1.
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
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: PTZ control from serial port (RS485 and Pelco P protocol

Post by jameswilson »

You caould also put an led on the data line to ensure data is being transmitted
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
fruizalonso
Posts: 4
Joined: Tue May 28, 2013 6:56 pm

Re: PTZ control from serial port (RS485 and Pelco P protocol

Post by fruizalonso »

jameswilson wrote:you might want to try the address either side of the actual address in the head.
Im not sure which but one of the pelco protocols p or d, has it +1.
Yeeeeeaaaahh!!!

It's move!

Thanks James. On my ptz cam the address is 1, but on ZoneMinder the cam address must be set to 0, and it works!!!
For the baud rate, finally I open the perl script on /usr/share/perl5/ZoneMinder/Control and looking for the baud rate params of the serial, I found 4800 for Pelco-P and 2400 for Pelco-D, then I set the camera with that baud rate and... voilà! ...

Thanks James, I never would have suspected that the parameter settings of pelco device address could be wrong (-1 on ZoneMinder).
JonatanGarces
Posts: 3
Joined: Sun Feb 16, 2014 10:28 pm

Re: PTZ control from serial port (RS485 and Pelco P protocol

Post by JonatanGarces »

Hi! I'm configuring a hikvision speed dome camera and the source i tried with are remote rtp/rtsp and ffmpeg with success,
but the ptz won't work , so i connect the camera rs485 to the usb port of my laptop ( between them a usb to serial cable a rs232 to a rs485 converter )
how can i make it work a local control device , with the source ffmpeg or remote?
can both be mixed?
THANKS!
Locked