Skip to content

Decodes CCTV PTZ Telemetry Data including Pelco D,Pelco P,BBV,Bosch/Philips PCSS,Forward Vision/Videmech,VCL,Vicon,American Dynamics/Sensormatic,Panasonic,Visca and JVC

License

Notifications You must be signed in to change notification settings

RogerHardiman/node-ptz-decoder

Repository files navigation

Pelco D, Pelco P, BBV422 and Bosch (Philips PCSS), Forward Vision, VCL, Vicon, American Dynamics(Sensormatic), JVC, Panasonic and Sony VISCA Telemetry Decoder (node-pelcod-decoder)

NEWS..... Updated to support NodeJS version 12 and 14 LTS. The serial port module may not build on older versions of NodeJS

This module reads Pelco D, Pelco P, BBV422, Bosch(Philips PCSS), Forward Vision, VCL, Vicon, American Dynamics(Sensormatic), JVC, Panasonic, Samsung and Sony VISCA CCTV Camera Pan/Tilt/Zoom data, validates each command and decodes its meaning. The descripion of each command is written to the console.

The Pelco D, Pelco P and BBV422 commands decoded include

  • Camera Number
  • Pan (direction and speed)
  • Tilt (direction and speed)
  • Zoom (Tele/In and Wide/Out)
  • Manual Focus (Near and Far)
  • Manual Iris (Open and Close)
  • Store Preset / Goto Preset / Clear Preset
  • Set Auxiliary (Turn On) / Clear Auxiliary (Turn Off)
  • Start Learning Pattern (Tour) / Stop Learning Pattern (Tour) / Run Pattern (Tour)
  • Set Zoom Speed

The Bosch (Philips) commands decoded include

  • Camera Number
  • Op Code 5 - Start Stop Variable Speed PTZ (Pan, Tilt, Zoom, Manual Focus, Manual Iris) with Pan Speed, Tilt Speed and Zoom speed
  • Op Code 7 - Aux On, Aux Off, Store Pre-Position (store preset), Goto Pre-Position (goto preset)

The Forward Vision commands decoded include

  • Camera Number
  • Pan (direction and speed)
  • Tilt (direction and speed)
  • Zoom (Tele/In and Wide/Out)
  • Manual Focus (Near and Far)
  • Manual Iris (Open and Close)
  • Store Preset / Goto Preset
  • Wiper, Washer, Lamp auxiliary On/Off
  • Set Zoom Speed
  • Request Current Position
  • Reset Camera

The Vicon commands decoded include

  • Camera Number
  • Pan (direction and speed)
  • Tilt (direction and speed)
  • Zoom (Tele/In and Wide/Out)
  • Manual Focus (Near and Far)
  • Manual Iris (Open and Close)
  • Goto Preset
  • Auto Pan

The VCL commands decoded include

  • Camera Number
  • Pan (direction and speed)
  • Tilt (direction and speed)
  • Zoom (In and Out)
  • Manual Focus (Near and Far)
  • Manual Iris (Open and Close)
  • Auto Focus
  • Auto Iris
  • Store Preset / Goto Preset
  • Store Pattern/Tour
  • Aux On/Off

The American Dynamics AD422/Sensormatic commands decoded include

  • Camera Number
  • Pan  (direction and speed)
  • Tilt (direction and speed)
  • Zoom (Tele/In and Wide/Out)
  • Manual Focus (Near and Far)  * Manual Iris (Open and Close)
  • Goto Preset Position / Target
  • Store Preset Position / Target

The Panasonic commands decoded include

  • Camera Number
  • ASCII command string (which is not decoded at this time)

The Sony VISCA commands decoded include

  • Pan  (direction and speed)
  • Tilt (direction and speed)
  • Zoom (Tele/In and Wide/Out)
  • Goto Preset
  • Store Preset

The JVC commands decoded include

  • Camera Number
  • Pan
  • Tilt
  • Zoom
  • Focus Control
  • Iris Control
  • Goto Preset
  • Store Preset

The Samsung commands decoded include

  • Camera Number
  • Pan
  • Tilt
  • Zoom
  • Focus Control
  • Iris Control

Installation

Run the following command form the command line to install the NPM package

npm install pelcod-decoder

Command Line Test Program

The command line test program is executed as

node read_serial_port.js

This opens a serial port, waits for bytes and then decodes their meaning. The following flags customise the usage

  • -h help
  • -l list available serial port
  • -v verbose. Show raw bytes read read from serial port
  • -V version
  • --baud value
  • --parity value (values are none,even,odd)

Baud Rates

Pelco D telemery is always 7 bytes long and always starts with 0xFF and ends with a checksum. On a Pelco KBD300A Pelco D runs at 2400 baud 8-N-1 with 4800 and 9600 also common on other installations.

Pelco P telemetry is always 8 bytes long and starts with 0xA0 and ends with 0xAF and a checksum. On a Pelco KBD300A Pelco P runs at 4800 baud 8-N-1 with 2400 and 9600 also common on other installations. The Pelco CM9760-KBD outputs Pelco P in Direct Mode with Even parity.

Bosch (Philips) is always 9600 baud 8-N-1

Forward Vision is always 9600 baud ODD Parity 8-O-1

The Vicon system tested ran at 9600 baud although the official speed is believed to be 4800 baud

Stream Sources

The module processes data from a NodeJS Buffer object. A small example program, read_from_serial.js, will read from a Serial Port / COM Port (using node-serial) and pass data into the CCTV PTZ telemetry decoder.

Pelco D Testing

The code has been tested with Pelco D telemetry generated by

Pelco P Testing

The code has been tested with Pelco P telemetry generated by

  • Official Pelco KBD300A Keyboard (Rev A0, Ver 5.7)in Direct P mode 4800 baud 8-N-1 SW1-SW8: UP-UP-UP-UP-down-UP-UP-UP
  • Bosch Universal Camset CCTV Engineer Tool
  • BBV 422 PC Keyboard software
  • Bosch VIP X1 XF encoder
  • Sample byte strings from Commfront

Building Block Video BBV422 Testing

The code has been tested with BBV telemetry generated by

  • BBV 422 PC Keyboard software

Bosch (Philips) Testing

The code has been tested with Bosch (Philips) telemetry generated by

  • Bosch Universal Camset CCTV Engeering Tool
  • Bosch VIP X1 XF encoder

Forward Vision Testing

The code has been tested with Forward Vision telemetry generated by

  • Bosch Universal Camset CCTV Engeering Tool
  • Synectics Forward Vision interface
  • Axis Q7401 - which sends Get Current Position followed by Cameras Reset when not linked to a real camera

Vicon Testing

The code has been tested with Vicon telemetry generated by

  • Bosch Universal Camset CCTV Engeering Tool
  • Synectics Vicon interface

VCL Testing

The code has been tested with VCL telemetry generated by

  • Bosch Universal Camset CCTV Engeering Tool

American Dynamics (Sensormatic) Testing

The code has been tested with AD422 telemetry generated by

  • Bosch VIP X1 XF encoder

Panasonc Testing

The code has been tested with AD422 telemetry generated by

  • Bosch VIP X1 XF encoder
  • Axis M7001 encoder

JVC Testing

The code has been tested with JVC telemetry generated by

  • Axis Q7401 encoder

Samsung Testing

The code has been tested with Samsung telemetry generated by

  • Axis Q7401 encoder

Binary Releaess

We can make binary releases of the application using the NPM library called pkg. Note that as the code uses a native library for the Serial Port, the serial module DLL must be included along with the .exe

About

Decodes CCTV PTZ Telemetry Data including Pelco D,Pelco P,BBV,Bosch/Philips PCSS,Forward Vision/Videmech,VCL,Vicon,American Dynamics/Sensormatic,Panasonic,Visca and JVC

Resources

License

Stars

Watchers

Forks

Packages

No packages published