npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pelcod-decoder

v2.5.0

Published

CCTV PTZ Telemetry Decoder for Pelco D, Pelco P, BBV422, Bosch/Philips, Forward Vision, Vicon protocols and AD/Sensormatic protocols

Downloads

22

Readme

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

This module reads Pelco D, Pelco P, BBV422, Bosch(Philips PCSS), Forward Vision, Vicon, American Dynamics(Sensormatic) and Panasonic 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

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 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)

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.

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

  • Official Pelco KBD300A Keyboard (Rev A0, Ver 5.7)in Direct D mode 2400 baud 8-N-1 SW1-SW8: UP-UP-UP-UP-down-UP-down-UP
  • Bosch Universal Camset CCTV Engineer Tool
  • Bosch VIP X1 XF encoder
  • NodeJS Pelco D Generator https://github.com/Scoup/node-pelcod
  • ISpyConnect http://www.ispyconnect.com/

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

Vicon Testing

The code has been tested with Vicon telemetry generated by

  • Bosch Universal Camset CCTV Engeering Tool
  • Synectics Vicon interface

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